Skip to content

Instantly share code, notes, and snippets.

@craigmdennis craigmdennis/click.js
Last active Aug 29, 2015

What would you like to do?
Open all external links in a new window with one line of jQuery
$('.content').on('click', 'a[href*="//"]:not([href*=""])', function(){
$(document).ready( fucntion(){
$('.content a[href*="//"]:not([href*=""]').attr('target','_blank');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.