lw-bobbimartin / simplemodal

Automatically exported from code.google.com/p/simplemodal
0 stars 0 forks source link

Close unbinds jQuery events from the content, even if content is returned to DOM #78

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
SimpleModal

Version of SimpleModal: 1.4.2
Version of jQuery: 1.7.1
Browser/OS: FireFox 10.0 / MacOSX Lion

Problem is I have jQuery click handers on my content that I am using for the 
Simple Modal content. after closing the modal dialog, the click handlers are 
gone (meaning the second time I open the same dialog, the click handlers do not 
exist).

I'm not a jQuery wizard, but I found that changing remove() to detach() solved 
my problem in the close handler of SimpleModal:

line 692 / 698:
s.d.data.hide().remove()   =>   s.d.data.hide().detach();

Original issue reported on code.google.com by heli...@gmail.com on 11 Feb 2012 at 11:25