Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Created August 17, 2018 23:08
Show Gist options
  • Save carmoreira/8b5c9c0d38761bf44f97e29445cbbb90 to your computer and use it in GitHub Desktop.
Save carmoreira/8b5c9c0d38761bf44f97e29445cbbb90 to your computer and use it in GitHub Desktop.
Interactive World Maps: Open new URL only on mobile
jQuery( document ).ready(function() {
var isMobile = window.matchMedia("only screen and (max-width: 760px)");
if (isMobile.matches) {
iwmparam[0]['action'] = 'i_map_action_open_url_new';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment