And I would like to select the span tag when the parent anchor is hovered over.
This is the code I currently have, but it only works in certain versions of firefox and I would like it to work in all of the major browers. In the other browsers it will either select all of the anchor tags at the some time, or it will select none of them. I am pretty sure that the problem lies with the :hover selector in jquery.
You want to set your like elements to have the same class. So menu items can all be given a class of [for example] "menuLink".
in your css you can control ".menuLink" properties and those properties will affect all of those items with that class.
the jQuery selector you would want to use is $(".menuLink", this).hover.....
the selector grabs an element whose class is menuLink, and 'this' refers to the one that is currently in the hover state. That is the one that will be manipulated by your code.
these elements should have unique ID's, not unique classes.
Last edited by robish518; 10-19-2009 at 01:03 PM.
Reason: clarifying
Here is the page I am working on: http://www.patrickrauland.com/ The selectors work just fine in my version of firefox, but they do not work in IE 7, Chrome, Safari, and some versions of firefox.
When I hover over the anchor tag I want the span within the anchor tag to fade in.
so the selector for hovering over the anchor tag is pretty easy:
HTML Code:
$("#content h2 a").hover
But I don't know how to specify the span within the hovered anchor tag.
Thoughts? Why does this only work with Firefox and none of the other browsers?
Sorry it took a while to get back. I've been away from the computer for a while. If you still need a solution try this out...
This was tested in IE8, FF3, & Safari. Remember, that once you are inside the callback function for that selector, you don't need to reselect it again. Using "this" refers to the item that you have selected that is part of that selector.
Bookmarks