How to load an affiliate cookie using this jquery?

by 1 replies
2
Hey I've got some code for loading an affiliate cookie, based on the class of a URL.

Code:
$('a').click(function(e) {
  var affiliate = $(this).attr('class');

  // do something with it

  return false;
})
Say I wanted to load the Amazon affiliate cookie for this url, what could I put in //do something here.

I tried <img src="amazon aff url"> but that didn't work...
#programming #affiliate #cookie #jquery #load
  • What do you mean you have some code for loading a cookie?

    Your getting it or setting it?

    That code above is doing nothing other than setting an empty event for clicks on all anchor tags. So it's basically doing nothing.

Next Topics on Trending Feed

  • 2

    Hey I've got some code for loading an affiliate cookie, based on the class of a URL. Code: $('a').click(function(e) { var affiliate = $(this).attr('class'); // do something with it return false; }) Say I wanted to load the Amazon affiliate cookie for this url, what could I put in //do something here.