-6

All links whose href's begin with https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2

add the following attribute:

onclick="return EJEJC_lc(this);

I've only got this far but i don't know how to add the onlick function to it

$("a[href$='https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2'].") 
Scott Marcus
  • 60,351
  • 6
  • 44
  • 64

1 Answers1

1

You just needed to add the on() method.

http://api.jquery.com/on/

$('a[href^="https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2"]').on("click", function(){ 
  EJEJC_lc(this);
});
Cory Fail
  • 1,030
  • 8
  • 26