Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript help with some jquery

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38151
    cybershot
    Participant

    I am trying to figure out how to get the background of the hovered anchor tag to turn the span.number background red. Right now when I hover, it turns them all red. I only want the one that is hovered on red. So if you hover on a category, it will turn the category color red as well as the background of the number to the right red.

    http://jsfiddle.net/fPj52/3/

    #103156
    aspiringWebbie
    Participant

    Maybe list each one as an individual class and call the class?

    $(#span).onMouseOver(function(){
    $(#span.number.one).css(‘red’);
    });

    #103166
    Senff
    Participant

    First off: your markup is wrong, more specifically the nesting:

  • Movies10
  • You close the first span, while the anchor is still open. I believe you want this:

  • Movies10
  • Also, I don’t really see the point of putting each line in a separate UL and then have two LI’s in there. I think you’d be better off with one UL, with 4 LIs that each contain two spans, but anyway, that’s not what this issue is about.

    Here’s something that you should be able to use: http://jsfiddle.net/fPj52/27/

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.