Skip to content

Instantly share code, notes, and snippets.

@jbd91
Created August 19, 2019 16:07
Show Gist options
  • Save jbd91/a38f8e21b608c552fb9eb7d5e1225634 to your computer and use it in GitHub Desktop.
Save jbd91/a38f8e21b608c552fb9eb7d5e1225634 to your computer and use it in GitHub Desktop.
Detect Query String and append to iframe src Solution 2
if ($("body").hasClass("page-id-3421")) {
if (document.location.search.length) {
document.getElementById('impactMap').src = 'https://www.abodo.com/search-widget?' + window.location.search;
} else {
document.getElementById('impactMap').src = 'https://www.abodo.com/search-widget';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment