PDA

View Full Version : Cut & Paste jQuery Mega Menu



JohnnyWeb
07-19-2010, 07:34 PM
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

jscheuer1
07-20-2010, 07:23 AM
The key is here:


<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:


<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.

JohnnyWeb
07-20-2010, 06:26 PM
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

jscheuer1
07-20-2010, 07:36 PM
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.

dragunov
07-04-2013, 08:00 PM
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

jscheuer1
07-05-2013, 01:58 AM
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/dynamicindex1/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.