I created a jquery function that binds some fields, but it does not work when I add a new line.
The main problem is that I do not know how to define an insert in the DOM and bind it to my function.
thanks
Use the live or delegate functions to bind to form elements. They will continue to work even after entering new form elements, and you do not need to re-attach event handlers every time.
live
delegate
Related questions:
$('.add-row a').click(my_function)
while my_function does not include return false; , it should not interfere with the existing functions of this button
my_function
return false;
The above suggestions do not work for this particular problem. I will write an error and ask if they can assign an identifier to this link or fix it differently.
Edit: bug registered https://code.djangoproject.com/ticket/16359
Source: https://habr.com/ru/post/1309834/More articles:Custom date format with jax-rs in apache cxf? - jax-rsHow effective is this Tagging solution? - sqlFacebook API - types of authorization? - facebookHow to get the name of a new file through the terminal? - command-lineHow to get a list of names + the number of entries associated with a name from another table - sqlHow to create a PHP module with Vala programming language? - gccLinking dynamically created elements in jQuery - javascriptHow can I parse an XML document with Schema 1.1 in the Eclipse IDE? - eclipseadding a new dom element, desire to re-bind - jqueryCakePHP hasAndBelongsToMany (HABTM) Delete Connection Record - cakephpAll Articles