Created
September 29, 2020 10:00
-
-
Save hkneptune/7ca34f2a04382f68f616ae68bf6cf2a7 to your computer and use it in GitHub Desktop.
jQuery - Open All URLs In New Tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).on('click', 'body a', function(e){ | |
e.preventDefault(); | |
var url = jQuery(this).attr('href'); | |
window.open(url, '_blank'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment