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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -