I want to set affiliate cookies to links based on a CSS class. Say for example I'm an affiliate for Ebay and an affiliate for Amazon and I had both links. Ebay url class="ebay" and Amazon url class="amazon" So the jQuery would be coded to set the affiliate cookie onclick , based on the class of the URL. Is it possible? EDIT: This is what I tried so far: <script language="JavaScript"> $('a').click(function(e) { var affiliate =...
Originally asked by Mark on Stack Exchange (stackoverflow) (CC BY-SA 4.0).