You could simply use $(window).trigger('unload')
That will unbind all events bound through jQuery. A function for doing that is already defined in the source code: jQuery( window ).bind( 'unload', function(){ for ( var id in jQuery.cache ) // Skip the window if ( id != 1 && jQuery.cache[ id ].handle ) jQuery.event.remove( jQuery.cache[ id ].handle.elem ); }); cheers - ricardo On Mar 16, 4:21 pm, Jonathan <jdd...@gmail.com> wrote: > jQuerys selector engine is browser independent. So $("*") actually > refers to all elements and works in all browsers (this is why we love > it). > > But I would be careful. $("*").unbind() can be slow. > > On Mar 16, 11:50 am, redcom <red...@gmail.com> wrote: > > > isn't this ie specific? > > > On Mar 16, 8:50 pm, MorningZ <morni...@gmail.com> wrote: > > > > *maybe* > > > > $("*").unbind(); > > > > all your code is looking at the document itself and then the <body> > > > tag itself > > > > On Mar 16, 2:44 pm, redcom <red...@gmail.com> wrote: > > > > > Hello > > > > I have a custom application build on top of gecko 1.9 and using > > > > spidermonkey and some c++ calls js->c++->js > > > > > When i reload one application page i get some events triggered after > > > > the page has been loaded. > > > > The GC is destroying my objects and html elements some how, but the > > > > events remain attached. > > > > > Is there a possibility to unbind all events at once? > > > > > I tried: $(window).unload(function () { > > > > $(document).unbind(); or $("body").unbind(); or $(document, > > > > window).unbind(); > > > > > }); > > > > > but the events are still somewhere in a cache system. > > > > > Can or is there a flag that i can set and prevent jquery to use cache? > > > > > The jquery is 1.3.2