PDA

View Full Version : jQuery Mega Menu not working on my forum



IlliniCrusader
Jan 18th, 2010, 01:57 AM
I am having an issue using the Cut & Paste jQuery Mega Menu (http://www.javascriptkit.com/script/script2/jkmegamenu.shtml).

I am using it on the main page of my future forum (test forum is here - http://illini-nation.deepermethod.com/community/index.php It's the button labeled 'Forum Categories'). The mega menu works fine on the main page of the forum, but once I drill down into the forums, the mega menu no longer works. The mega menu ONLY works on the index of the forum.

Any and all help is greatly appreciated.

IlliniCrusader

low tech
Jan 18th, 2010, 03:32 AM
Hi
not sure if this helps, but FF reports

Error: The stylesheet http://illini-nation.deepermethod.com/community/index.php/css/jkmegamenu.css was not loaded because its MIME type, "text/html", is not "text/css".
Source file: http://illini-nation.deepermethod.com/community/index.php/board,5.0.html

IlliniCrusader
Jan 18th, 2010, 03:39 AM
Hi
not sure if this helps, but FF reports

Error: The stylesheet http://illini-nation.deepermethod.com/community/index.php/css/jkmegamenu.css was not loaded because its MIME type, "text/html", is not "text/css".
Source file: http://illini-nation.deepermethod.com/community/index.php/board,5.0.html

The type is "text/css"

<link rel="stylesheet" type="text/css" href="./css/jkmegamenu.css" />

Is this not correct?

low tech
Jan 18th, 2010, 03:55 AM
Hi
Like I said i'm unsure.
Sorry I'm not a pro coder but hopefully somebody might be able to offer further help with the above info.

I would hazzrd a guess that to work out what FF is actually ref to, it might help solve yr prob.

I can't pinpont it myself tho, but not for the want of trying:-)

IlliniCrusader
Jan 18th, 2010, 03:59 AM
Hi
Like I said i'm unsure.
Sorry I'm not a pro coder but hopefully somebody might be able to offer further help with the above info.

I would hazzrd a guess that to work out what FF is actually ref to, it might help solve yr prob.

I can't pinpont it myself tho, but not for the want of trying:-)

Thanks anyway Tech. I appreciate the try :thumbsup:

IlliniCrusader
Jan 18th, 2010, 04:05 AM
It looks like the FF error says "jkmegamenu is not defined." It leads me to this line of code:


jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")

Do I need to enter something else where the above is underlined?

low tech
Jan 18th, 2010, 04:16 AM
Hi

I am using megamenu too and honestly I can't see anything wrong with yr setup.

The undefined error could just be that something is not loaded or ref.

IlliniCrusader
Jan 18th, 2010, 04:21 AM
Well, it doesn't go beyond the main page in FF, IE, Opera, Chrome, and Safari. What do you use as your <!--Mega Menu Anchor--> URL? I don't want it going anywhere, I just want it initiating the drop down - no true URL.

I am looking at other options right now. Maybe a multi-level drop down menu.

low tech
Jan 18th, 2010, 04:22 AM
Hi

I reloaded the page and the above error didn't appear but this did --- an xml tag mismatch -- closing slash / missing on img tag.


<td style="height: 39px; text-align: center;">

<img src="http://illini-nation.deepermethod.com/community/Themes/GoogleTheme_2rc1/images/custom/donate.png"></td>

IlliniCrusader
Jan 18th, 2010, 04:26 AM
Hi

I reloaded the page and the above error didn't appear but this did --- an xml tag mismatch -- closing slash / missing on img tag.


<td style="height: 39px; text-align: center;">

<img src="http://illini-nation.deepermethod.com/community/Themes/GoogleTheme_2rc1/images/custom/donate.png"></td>

Yeah, I saw that, not sure what that is about - any ideas?

low tech
Jan 18th, 2010, 04:34 AM
Hi

close the img tag /


<img src ..... / >

also I don't use a url ----- I just have the megaanchor in a div (span propably works too)

<div id="megaanchor" </div>

IlliniCrusader
Jan 18th, 2010, 04:44 AM
Hi

close the img tag /


<img src ..... / >

also I don't use a url ----- I just have the megaanchor in a div (span propably works too)

<div id="megaanchor" </div>
Still nothing. The menu seems to work everywhere except the forum. It works in the member profile, the admin area, private messages, etc. It just won't work inside the forums :confused:.

low tech
Jan 18th, 2010, 04:50 AM
hi

sorry about that.

I'm out now ---- but I wish you luck ----- sorry I couldn't have been more help.

Curious to know the answer tho.

IlliniCrusader
Jan 18th, 2010, 04:50 AM
hi

sorry about that.

I'm out now ---- but I wish you luck ----- sorry I couldn't have been more help.

Curious to know the answer tho.

Thanks anyway Tech.

Anyone else please???

IlliniCrusader
Jan 18th, 2010, 03:42 PM
Been playing with this for awhile, and have come to no solution. I really want to use this menu, and plan to, but I also need to start looking at alternatives just in case.

Any help guys?

rnd me
Jan 19th, 2010, 01:51 AM
<script type="text/javascript" src="./js/jkmegamenu.js">
the realtive path of the script changes as you go in.
as coded, from http://illini-nation.deepermethod.com/community/index.php/topic,8.0.html, the script looks for http://illini-nation.deepermethod.com/community/index.php/js/jkmegamenu.js

use an absolute or a root-relative url instead: /js/jkmegamenu.js or http://illini-nation.deepermethod.com/js/jkmegamenu.js

IlliniCrusader
Jan 19th, 2010, 02:22 AM
<script type="text/javascript" src="./js/jkmegamenu.js">
the realtive path of the script changes as you go in.
as coded, from http://illini-nation.deepermethod.com/community/index.php/topic,8.0.html, the script looks for http://illini-nation.deepermethod.com/community/index.php/js/jkmegamenu.js

use an absolute or a root-relative url instead: /js/jkmegamenu.js or http://illini-nation.deepermethod.com/js/jkmegamenu.js

Not sure I understand - can you elaborate further? Where do I use an absolute URL?

I have already started looking for another menu to use, but it would be easier to just adapt this one.

rnd me
Jan 19th, 2010, 03:35 AM
Not sure I understand - can you elaborate further? Where do I use an absolute URL?


sorry i was unclear.
you need to change the src attrib of your script tags.

for example, anywhere you link to jkmegamenu.js, change the src to "/community/js/jkmegamenu.js".


ex:

<script type="text/javascript" src="./js/jkmegamenu.js"></script>
becomes

<script type="text/javascript" src="/community/js/jkmegamenu.js"></script>



making the src change on all your pages/templates should solve your menu problem completely, since the script seems to work just fine on the main page.

make the changes to the linked site, and if that doesn't help let me know and i'll take another look.

An illini myself, i'll be glad to go the extra mile(s) for you and the site!