Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery : How to unbind dynamically created elements?

I have buttons created dynamically. I know that bind/unbind is only applicable for elements not created dynamically. To add functionality I use .live() which works perfectly. My problem is Idk how to remove the functionality. Please help.

like image 744
kwan_ah Avatar asked Dec 15 '22 12:12

kwan_ah


1 Answers

Use die() function for this

Read http://api.jquery.com/die

Also in Jquery-1.9 these functions are removed

For this you can use on and off

Read http://api.jquery.com/on and http://api.jquery.com/off

like image 78
Rohan Kumar Avatar answered Dec 28 '22 22:12

Rohan Kumar