Yes, $(document).ready() should only happen once - when the document is first ready. What you're using for "magic" would infuriate developers on most other projects! :)
You should have a separate function for an ajax callback to do whatever you're doing, even if it's the same code, and you're reusing the same Function object for it. - Brian > Webunity | Gilles van den Hoven schrieb: >> Hi Guys, >> >> Just found another document.ready bug at least i hope it is a bug :) >> >> The document.ready is not firing in IE7 when loading content via ajax >> into a DIV. Is this a common problem which is allready known? Someone >> might have a fix for this? >> >> The current scenario fires succesfully in both firefox and IE6 just >> like i want it to be and is like this: >> - I load some javascripts in the header of the page, in those headers >> are document.readys >> - When i load new data into a div, i want the document.readys to fire >> again, since they do some jQuery magic >> >> As said, this scenario successfully works in both Firefox 1.5.0.2 and >> IE6, just like i want it to do, but fails in IE7. >> >> Hope someone can help me. > It's weird that it works in IE6 and FF. So far, the solution to this > problem was to execute the document ready code in an ajax callback... > > -- Jörn > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/