include - 2 JQuery menus conflicting -


i have 2 jquery navigation menus.

my main navigation (navig.php) uses following jquery scripts:

<script src='/new/navig/js/jquery-1.8.1.min.js' type='text/javascript'></script> <script src='/new/navig/jquery.kwicks.js' type='text/javascript'></script> 

my sub menu (menu.php) uses following jquery scripts:

<script type="text/javascript" src="/new/menu/jquery.js"></script> <script type="text/javascript" src="/new/menu/sliding_effect.js"></script> 

i have little knowledge of subject, seeing both these navigations included in pages, have declare jquery @ start of every page? if scripts delete in these pages?

edit: moved first script each page index.php includes pulled to. menu.php still worked fine navig.php did not (same before). script in navig.php being declared in body before used , not work anywhere else.

is there way overcome conflict or need find menu?

thanks!

yes, browser need scripts using in page everytime. if have master page concept include globally used scripts , css there. if have page specific scripts can specified in page itself.

also think bundling commonly used script/css files.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -