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.