Make all current and future elements draggable
I have a table with rows that are added/removed by the user, and that
are made draggable by calling .draggable after the page first loads.
When rows are added to the DOM, what is the most efficient way to make
the new rows draggable as well? Right now, I call .draggable on *all*
the table rows on the page, when really only one new row needs it.
I could call .draggable only on the new row being inserted, but was
wondering if there is something cleaner, as I have to make sure to
pass it the same arguments I passed .draggable when the page loads.
Is there functionality like the .live() event handler in jQuery where
all future elements matching the pattern are hooked up to the event?