3
Masking Affiliate Links With jQuery
You can mask affiliate links using this so that the url appears to be different than what it actually is.
$(function(){
$('a.affLink').mouseover(function(){
window.status=this.title;
return true;
}).mouseout(function(){
window.status='Done';return true;
});
});
Levels: Syntax: jQuery






User Comments
( ADD YOURS )Adam W. Warner February 14
This looks to be a very useful function, but it's not clear how one would use it to hide links. Would have to give each link a class of "afflink" when inserting into a post/page?
Jared February 14
Yeah, you could do a few other things though if you added some code to this. For example use a regex to find urls that have a certain domain, or query string in them, then use this snippet on those urls.
Adam W. Warner February 14
Very cool, thanks for the clarification and additional options. Most appreciated:)
Trackbacks