I'm building a jquery plugin for use in my projects in editing items in a table. When a user clicks on an item to edit, I do a pop-up form where they then save the data. When the save is successful I return the new data as a html row and replace the old row with this new returned row, but then I have to rebind the events. I can't figure out how to do this in a generic way in jquery. I am not sure if using .live() in a plug in is also good practice or if it will always work.
Currently I'm calling a call back function to rebind the events which then needs to happen on each page where I want to use it, I would like the plug in to do this for me instead.