fnOpenClose() doesn't work when fnReloadAjax(); was called...

fnOpenClose() doesn't work when fnReloadAjax(); was called...

morthahnamorthahna Posts: 18Questions: 0Answers: 0
edited September 2010 in Plug-ins
After a fnReloadAjax(); the details pane doesn't open/close anymore.... Just calling fnOpenClose(); after the fnReloadAjax() also doesn't do the trick...

Anyone any ideas?

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin
    Your event handlers will have been destroyed when the new DOM elements were created (and the old ones removed). The easiest answer is to simply use $().live() for events which DOM elements which can be created and destroyed. An alternative is to simply add then again after fnReloadAjax.

    Visual Event ( http://www.sprymedia.co.uk/article/Visual+Event ) is very useful for seeing which elements have events on them, and which do not.

    Allan
This discussion has been closed.