Skip to main content
added 40 characters in body
Source Link
pixelbobby
  • 4.4k
  • 5
  • 33
  • 50

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org/"]').attreach(function(){ $(this).attr({target: "_blank", title: "Visit " +   $(this).href + " (click to open in a new window)"}); }); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org/"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org/"]').each(function(){ $(this).attr({target: "_blank", title: "Visit " +   $(this).href + " (click to open in a new window)"}); }); 
added 1 characters in body
Source Link
pixelbobby
  • 4.4k
  • 5
  • 33
  • 50

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org"]'org/"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org/"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 
added 4 characters in body
Source Link
pixelbobby
  • 4.4k
  • 5
  • 33
  • 50

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood"]''a[href*="fairfood.org"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 

You can use a single jQuery selector to do this:

$('a').not('a[href*="fairfood.org"]').attr({ target: "_blank", title: "Visit " + this.href + " (click to open in a new window)"}); 
Source Link
pixelbobby
  • 4.4k
  • 5
  • 33
  • 50
Loading