views:

127

answers:

2

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.

Thanks

A: 

$('.add-row a').click(my_function)

as long as my_function does not include "return false;" it shouldn't interfere with the existing functionality of that button

metamemetics
i think $("selector").live("click",my_function()) is a better solution, you do it just one time at the beginning and don't need other selector, it's simpler.
sacabuche