1

I have function to switch my

<a class="return"/>

Into

<a class="return2"/> 

It would allow to have 2 differents actions, but once changed, it always return the class which is executed.

Here is an example of my problem :

http://www.jsfiddle.net/Cashandrick/gztx6ztL/1/#&togetherjs=IHFlwoBnT6

As you see, impossible for the .test2 function to work

Thank you for your help

DaniP
  • 37,813
  • 8
  • 65
  • 74
Nolween Lopez
  • 53
  • 1
  • 8
  • 2
    Since you are changing the classname you need to delegate the event, at first you bind the function for those elements with that classname but after ready you change the classname but hasn't the event bind since are a "new" element: http://jsfiddle.net/gztx6ztL/2/ ... also yo have a mistake on test2 function adding and removing the same class – DaniP Apr 20 '17 at 16:07
  • Thank you so much Danip ! I have been stucked and found nothing ! – Nolween Lopez Apr 21 '17 at 08:42

0 Answers0