I made a jQuery function that binds some fields, but it doesn't work when I add a new inline.
The main problem is that I don't know how to detect the insertion in DOM and bind it to my function.
Use the live
or delegate
functions to bind to form elements. They will continue working even after you insert new form elements, and you don't need to re-attach the event handlers every time.
Related questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With