Advanced Search

Results 1 to 6 of 6

Thread: Cut & Paste jQuery Mega Menu

  1. #1
    Join Date
    Jul 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cut & Paste jQuery Mega Menu

    1) Script Title:

    Cut & Paste jQuery Mega Menu

    2) Script URL (on DD):

    http://www.javascriptkit.com/script/script2/jkmegamenu.shtml"]http://www.javascriptkit.com/script/script2/jkmegamenu.shtml

    3) Describe problem:

    This may sound dumb, but what exactly am I changing so that I can have multiple links activated on the same page? I have the script now associated with 4 different links, but only one works. That one works great btw.

    Thanks
    John

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,690
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    The key is here:

    Code:
    <script type="text/javascript">
    
    //jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
    jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")
    
    </script>
    The green part is just a comment/instructions. If you want a second one, define it with different terms - say like so:

    Code:
    <script type="text/javascript">
    
    //jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
    jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")
    jkmegamenu.definemenu("anotheranchor", "megamenu2", "mouseover")
    </script>
    Now the first one will be triggered onmouseover of the element with the id of megaanchor, and will show the content in the megamenu1 division.
    The second will be triggered onmouseover of the element with the id of anotheranchor, and will show the content in the megamenu2 division.

    All four of these id's must be unique.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks. It worked fine when I added the 2nd mega menu to the site. However I tried to add a 3rd, and no go. In fact, if I named the 3rd certain ways, none of them would work.

    Here is what I did:

    <script type="text/javascript">

    //jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
    jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")
    jkmegamenu.definemenu("anotheranchor", "megamenu2", "mouseover")
    jkmegamenu.definemenu("yetanotheranchor", "megamenu3", "mouseover")


    </script>

    Right now, the first 2 are working great, but the 3rd isn't. All 6 items are named differently.

    Thanks,
    John

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,690
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    Probably something about the markup. Perhaps you didn't use the exact id for something, spelling it one way in the initialization and another way in the actual markup.

    To be more specific, I would have to see the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jul 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i am facing a jquery conflict probably with jquer 1.4.4.min.js...................and wheni replace the jquery 1.3.2 with 1.7.2 some crappy animation effect comes.......... please help...somebody... actually i wanted a picture slider in my website...so i used nivo slider that uses jquery 1.4.4 min.js...
    Somebody help..
    Thanks in Advance

    Vikram

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,690
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    This is an old thread so you should have started a new thread. But you're a new user, so next time, please start a new thread for a new question.

    Are you even using the Javascript Kit Mega Menu? If so, it should work with most versions of jQuery. If not, you can use two versions of jQuery on the page, or perhaps switch to the DD Mega Menu:

    http://www.dynamicdrive.com/dynamici...ddmegamenu.htm

    It's very similar to the Javascript Kit Mega Menu but uses jQuery 1.5.2, and can probably use 1.4.4.

    BTW, the home page of the Nivo Slider is using jQuery 1.8.3, so that's another option you could try. Perhaps you have an older version of Nivo.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •