Skip to content

Instantly share code, notes, and snippets.

@mimetaur
Created March 27, 2010 20:57
Show Gist options
  • Save mimetaur/346347 to your computer and use it in GitHub Desktop.
Save mimetaur/346347 to your computer and use it in GitHub Desktop.
jQuery Plugin that adds "target=_blank" to a set of a elements
(function($) {
$.fn.extend({
newWindow: function() {
return this.each(function() {
$(this).attr("target", "_blank");
});
}
});
}) (jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment