Thank you for your answer. I have actually looked into the FAQ. The Question i'm asking myself is: is it a valable option to proceed as I am doing (unbind everything on click, once ajax file is loaded rebind everything)? On all my test, I get no problem (only a slight lag in IE6 or FF1.5) but that's it...
On Apr 30, 5:53 pm, Carl Von Stetten <[EMAIL PROTECTED]> wrote: > Peps, > > Look into the LiveQuery plugin. It monitors the DOM, and automatically > binds events to new elements created from ajax requests. There are > other methods to do this is well. Check out this jQuery FAQ: > > http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... > > HTH, > Carl > > Peps wrote: > > Hi, > > > I have finished developping a website with jQuery. First of all, > > thanks to everybody who worked on this great Javascript library. It's > > truly an incredible timesaver. > > > My question concerns binding and unbinding events when there are Ajax > > calls in which content is injected into the DOM. At first I noticed > > that the newly injected elements where not affected by the original > > event bindings. I realized I had to rebind everything on each Ajax > > calls. However that was not the end of my problems. I noticed that > > when you rebind everything, all the elements which were not injected > > in the DOM through the Ajax calls were actually binded double! > > > My final strategy has been to unbind everything on each ajax calls and > > THEN rebind every event (a 12kb JS file) within the file which was > > called through the ajax request. This works on all browser and the > > speed is good. I know however that this is probably not the best way > > to go... > > > Does anyone have any advice which they could give me? > > > Thank you.