[jQuery] Re: How to prevent loading jquery twice

2009-03-24 Thread Andy789
Thanks, guys. After all, I gave up on jscript solution and added a switch adding jscript to the header on a php level On Mar 23, 11:44 pm, Peter Edwards p...@bjorsq.net wrote: Are you using joomla to load jQuery? or are you wringin script tags in some sort of template? I came across

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Liam Potter
why would you be loading the library for each script? Andy789 wrote: Hi all, I have different independent modules using jquery and need to avoid its double loading. So, instead of loading jquery, I am loading the code: if (typeof jQuery != 'undefined') { document.write('script

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Andy789
Because some components are loaded inside of iframe and need its own jQuery. some compionents are loaded one-by-one and need only one common library On Mar 23, 9:39 pm, Liam Potter radioactiv...@gmail.com wrote: why would you beloadingthe library for each script? Andy789 wrote: Hi all, I

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread jQuery Lover
Why not include jQuery in your head and don't worry about it being already loaded or not in your components. Then remove jquery loading in all of your components... This will make sure your components concentrate on their main business logic ... Read jQuery HowTo Resource -

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Liam Potter
well, the ones loading through the iframe will need jquery loaded in the iframe, and the components loaded one-by-one only need jquery loaded once.. I don't understand what you are trying to do hre, just load jquery in the head. Andy789 wrote: Because some components are loaded inside of

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Andy789
we are talking about joomla's index.php (used as a main page) and index2.php (used as an iframe). Index2.php is always a part of index.php. Therefore, 1) if I include jquery to the main page header, the iframe (generated as index2,php) will not work as there is no jquery in there 2) if I include

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Andy789
also, it is working (only in FF, though) and not very stable. I think what is happening, when I write the script.../script reference to the header, it does not mean that it is loaded. in fact, it is loaded SOMETIMES On Mar 23, 10:28 pm, Andy789 e...@abcstudio.com.au wrote: we are talking about

[jQuery] Re: How to prevent loading jquery twice

2009-03-23 Thread Peter Edwards
Are you using joomla to load jQuery? or are you wringin script tags in some sort of template? I came across this: http://www.packtpub.com/article/using-javascript-effects-with-joomla which seems to imply joomla can handle you script inclusion. hope this helps on 23/03/2009 11:41 Andy789