$('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)"}); });
$('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)"});