function bindFrames(){ jQuery.each(document.frames,function(){ if (!this.$) this.$ = window.parent.$; }); };
You can't watch for DOM changes, so you need to call it somewhere whenever you add a new frame. - ricardo On Oct 15, 11:58 pm, ken <[EMAIL PROTECTED]> wrote: > Say I have an application that utilizes heavy AJAX, but also uses iframes > (same domain). In these iframes, I need access to jQuery. I want to avoid > loading another instance of jQuery for each one. Ideally, there would be an > event to that I could bind to that would auto-alias the top window's jQuery > to any new iframes (or new windows?), or similar. Basically I want to avoid > each iframe having to load jQuery and the 50 plugins that I plan to use. > > I looked for a plugin that might do this, but couldn't find one. Has anyone > faced this situation before? > > Thanks, > ken