I’m writing some code based on the following article:
jQuery – Dynamically Adding Form Elements
What I would like to do is to have buttons on each row to add a new row below the row the button is on.
This works OK for the first row, because there is code in document.ready to attach a jQuery function to the button.
However, the button in the second row is added dynamically – how do I attach the same function to this dynamically added button?
Thanks.
Matt.
use live() for dynamically added objects
instead of
use
http://api.jquery.com/live/