- This topic is empty.
-
AuthorPosts
-
September 9, 2009 at 7:32 am #26040
leehughes
MemberHi,
Am having trouble getting my drop down menu to work in IE.. am trying to validate it and I have 2 errors on the drop down..
Line 112, Column 100: Attribute "onMouseOver" is not a valid attribute. Did you mean "onmouseover"?
Line 112, Column 139: Attribute "onClick" is not a valid attribute. Did you mean "onclick"?
only problem is is that I can’t find this is the code.. am using wordpress and it uses different files like header, sidebar etc i have looked and it’s not in any of them..
Also, could this be the reason why it’s not working in ie? It was made to work in IE and did before I added the flash fade..
Thanks
September 9, 2009 at 8:09 am #63635blue642
MemberDo you have a link so we can help diagnose the problem?
September 9, 2009 at 8:14 am #63636leehughes
MemberAhhh sorry..
It should be in m header code right ?
This is my header code…
September 9, 2009 at 11:05 am #63627blue642
MemberCode:This code is what generates your menu, specifically <?php wp_list_pages(‘sort_column=menu_order&title_li=’); ?>
In firebug, I see that each link that has child pages has some javascript attributes "onclick" and "onmouseover" like the two in your error message, but they are all lowercase as the error suggests. I also don;t get the error you do in IE7 here at work, the dropdown does not work and when I check the log I get a syntax error about line 2, characters 1 and 3 ( I can’t copy and paste sadly…)From the code you posted, I don’t see what is injecting the javascript attributes into the navigation links.
the only onmouseover function I see in the header file is in the suckerfish JSCode:September 9, 2009 at 12:15 pm #63646leehughes
MemberHi mate..
I think I know what is causing javascript to be inserted into the navigation links.. Am using a plugin called page list plus which uses javascript to be able to unlink my parent pages. I couldn’t figure out a way to disable them using wordpress so I used this plugin which also is the reason for my extra home parent cat on the right.. :(
The drop down doesn’t work in any I.E since I added the flash fade so am looking to move that down below the header image now.. av spent too long doing that drop down menu and getting it to work in IE. I did it, then added the flash fade now it doesn’t work again so am gonna move that below the header image now
thanks for helping :)
September 9, 2009 at 1:07 pm #63652leehughes
MemberAhhh… figured it out..
I just disabled the plugin and checked my validation again and those two errors where now fixed..
So I need to figure out a way of disabling the parent links without using that plugin now :)
September 9, 2009 at 8:48 pm #63686blue642
MemberHey!
I got home and took a look at this again, glad you got it solved, for the most part.
since you are using jquery, this should work…
Code:I am not in any capacity great at Jquery, but decided I’d try to tackle this as it seemed simple enough.
It looks for the user to hover over a list item that contains an unordered list (your drop-down markup is built this way)Then when it finds that this happens, and the user clicks the anchor link associated with the list item it returns false, (same thing the plug-in did to deactivate the link)
Let me know if there’s any problems with it, my quick and dirty test worked well.
EDIT: I also noticed the rollovers/dropdown don’t work for me in Firefox…. any clue why?
September 10, 2009 at 4:25 am #63706leehughes
MemberHi,
Thanks for you help.. Does this mean that i can disable my parent links now?
Is there any way of me picking which ones I could do?
The drop down doesn’t work for anything on a windows based browser.. Works fine on mac… It’s since I added the flashfade to it.. am in the process of trying to move the drop down under the header image now so there is no conflict.. it’s givin me too much a of headache
September 10, 2009 at 10:14 am #63705blue642
MemberThe script I posted will disable your parent links, as far as choosing which ones, I’d have to rethink the code.
If you can tell me which ones you don;t want disabled I can take a shot.
September 10, 2009 at 10:17 am #63707leehughes
MemberHi,
Multimedia, expeditions, charity, miscellaneous all need to have their links disabled..
Where would I place this code? In the header?
Many thanks
September 10, 2009 at 10:53 am #63709blue642
MemberCode:
>
” rel=”stylesheet” type=”text/css” />$(document).ready(function () {
$("li:has(ul)").hover(function () { $(this).children("a").click(function () { return false; }); });
});
You could post it as in the above example, after
Code:wp_head();and before the
Code:tag.
I’ll work on disabling only those links. May take a bit as I am new to jQuery
September 10, 2009 at 10:59 am #63711leehughes
MemberHi,
Thanks for this.. I added the code where you said but my parent links are still linking.. Not to sure if am doing something wrong or what..
September 10, 2009 at 11:00 am #63712leehughes
MemberSeptember 10, 2009 at 11:05 am #63587blue642
MemberjQuery is conflicting, I’ll be right back, with a fix….
Code:try that instead.
September 10, 2009 at 11:17 am #63717leehughes
MemberWow.. i don’t know if that’s for the custom one for Multimedia, etc from what i can see it works for all choosen buttons except multimedia..
have a look :)
Thanks spud :)
AuthorPosts- The forum ‘CSS’ is closed to new topics and replies.