Skip to content

Instantly share code, notes, and snippets.

@sdeluce
Created January 22, 2014 20:05
Show Gist options
  • Select an option

  • Save sdeluce/8566355 to your computer and use it in GitHub Desktop.

Select an option

Save sdeluce/8566355 to your computer and use it in GitHub Desktop.
Faire qu'un lien href s'ouvre dans une nouvelle fenetre
$('a[@rel$='external']').click(function(){
this.target = "_blank";
});
/*
Usage:
<a href="http://www.catswhocode.com" rel="external">catswhocode.com</a>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment