0
[Solved]Need a help with jQuery !
The strikethrough feature of my todo list doesn't work when I have more than one item in my list . https://code.sololearn.com/W8s9DCVL2Wx0/?ref=app
9 Answers
+ 1
Try adding this before the rem click function
$(".rem").unbind('click')
+ 1
I just tested it again ...
Seems it works sometimes, and sometimes only works partially (one of four items isn't getting strike through effect)
I got no idea why yet ...
+ 1
Ruba Kh unbind is deprecated though . worked fine with off.
+ 1
I see my mistake. I am not removing the eventlistener after adding one .
With that said , the moment I tap on the cross , the class gets added but the next moment the gets removed as well as I'm using toggleclass .
0
Works from here ...
0
Ipang do you mean it works fine for you ?
0
Yes it is working fine for me ...
Added 3 to do lists
Press the 'x' button on each item
And they got strike through effect ...
0
Ipang it did not work with me
0
Yup the same idea đđŒ because each time you add click it duplicate the click function and it won't work so you make it off before making it on another time