Last active
December 29, 2015 03:59
-
-
Save chrisdpeters/7611262 to your computer and use it in GitHub Desktop.
Pop up PDFs in a new window with jQuery http://blog.liveeditorcms.com/pop-up-pdfs-new-window-jquery/
This file contains hidden or 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
$(document).ready(function() { | |
$("a[href*='.pdf']").click(function(e) { | |
window.open(this.href, "", "toolbar=0"); | |
e.preventDefault(); | |
}); | |
}); |
This file contains hidden or 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 -> | |
$('a[href*=".pdf"]').click (e) -> | |
window.open this.href, '', 'toolbar=0' | |
e.preventDefault() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment