Skip to content

Instantly share code, notes, and snippets.

@mikka23
Created April 21, 2016 11:36
Show Gist options
  • Save mikka23/8db7859ed5a682af6f208e1e47063344 to your computer and use it in GitHub Desktop.
Save mikka23/8db7859ed5a682af6f208e1e47063344 to your computer and use it in GitHub Desktop.
Query( window ).load( function() {
jQuery( '.fusion-menu a:not([href="#"], .fusion-megamenu-widgets-container a, .search-link), .fusion-mobile-nav-item a:not([href="#"], .search-link), .fusion-button:not([href="#"], input, button), .fusion-one-page-text-link:not([href="#"])' ).click( function(e) {
if ( location.pathname.replace( /^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname ) {
if ( this.hash ) {
e.preventDefault();
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment