SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2014
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Two different jQuery scripts conflict on the same page

    Hi,

    I have a serious problem. I am using two jquery code one is for slider and one is for menu.

    Know when i put menu script on a page slider disappear. menu start working and also showing drop down menu.
    but when i remove Menu jquery script from the page slider start working but menu didn't work.

    Menu Script files:
    HTML Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> (When i remove this script slider work otherwise won't work if this script is there)
    <script type="text/javascript" src="script.js"></script>
    Slider script file:
    HTML Code:
    <script type='text/javascript' src='js/jquery.flexslider.js'></script>
    How can i solve this problem.
    Slider Link : http://moghulweb.com/index2.html
    Menu link that i want to work on that website: http://moghulweb.com/MENU/

  2. #2
    SitePoint Member
    Join Date
    Aug 2013
    Location
    San Francisco, CA
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should try to make both scripts use one instance of jQuery. If you absolutely must use both version of jQuery than have a look at jQuery.noConflict().

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by Valjas View Post
    You should try to make both scripts use one instance of jQuery.
    Absolutely.

    Quote Originally Posted by Valjas View Post
    If you absolutely must use both version of jQuery than have a look at jQuery.noConflict().
    AFAIK, this won't help.
    noConflict just has jQuery relinquish use of the dollar symbol as an alias for the jQuery method.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •