views:

389

answers:

4

I really need someone's help.

this is what i'm trying to do to .. http://www.chohoh.com/pcs/hoverthing.html

now I need to change the font to #fff on the 'month, day and info' when you hover over the element.

people keep giving me hints. "child" i've googled (child, jquery, hover) and I'm not finding anything related to what i'm looking for. nor are there any good explanations on how to do this either.

any help, advice is appreciated !!! hope to hear from someone soon

-lb

A: 

Assuming that the month, day and info are in separate TDs, you can simply add this to your CSS:

td:hover {
  color: #fff;
}

No jQuery needed.

Randell
that doesn't really work in ie6.. i've already gone that route. suckerfish :hover.doens't work for what im trying to do.
miss chohoh
A: 

Miss chohoh,

As with my other answer, you need to add the on hover action.
I ran the following code in firebug and it works in at least firefox.

It selects all the elements with the proper class, then add's the hover action to all of them.

$.each(
        // The group of objects to modify, all objects of class .tik-date and type <p> 
        $(".tik-date p"), 
        function () {         // The function to run on all the objects in the first argument
           $(this).hover( 
              function () {   // The first function is run when the mouse hovers
                 $(this).css("color","#fff"); // Modify the CSS "color" attribute 
              },
              function () {   // The second function is run when the mouse moves away.
                 $(this).css("color","#000");
              }
           )
        }
 );

This is what I'm guessing you want to do for IE6?

 $.each(
        // The group of objects to modify, all objects of class .tik-date and type <p> 
        $("ul.tikt-txt"), 
        function () {         // The function to run on all the objects in the first argument
           $(this).hover( 
              function () {   // The first function is run when the mouse hovers
                 $(this).css("background-image","url(\"images/buytiks.png\")");  
              },
              function () {   // The second function is run when the mouse moves away.
                 $(this).css("background-image","");
              }
           )
        }
 );
Brian Gianforcaro
I'm coming from a web designer world. i'm no programmer by any means but would like to further my knowledge. kinda new to this jquery stuff.
miss chohoh
what you did works fine for hovering over each individual class but not the whole ul..my biggest problem im running into is that i do not know how to write this stuff from scratch so looking at all the ({.",; is confusing and im not sure what some of it is doing.
miss chohoh
I changed around the indentation, and added some more comments. Does that help? Is there anything specifically you don't understand?
Brian Gianforcaro
I went back and looked at your code some more, the bottom half Is one way I think you might be able to get the mouse over to work in IE6.
Brian Gianforcaro
I don't think anyone is understanding what i'm trying to do. i might tell the client on monday I'm gonna bail on this job because I can't find the right help and answers anywhere.. :(
miss chohoh
Hey Brian!I got it figured out. check it--> http://www.chohoh.com/pcs/hoverthing.child.html
miss chohoh
A: 

I figured it out.

It was just the way I was ordering things. got it!!!

Hope this helps someone else in the future.

http://www.chohoh.com/pcs/jquery.hover.example.html

miss chohoh
A: 

I always used this kind of code:

$('tr').hover(function(){ // replace tr with ANY tag you want.
 $(this).addClass('hover');
}, function(){
 $(this).removeClass('hover');
});

If you want to add hover on more than once item, you can use an array selector:

$('tr, div, span').hover....

Of course, in css, you can do this:

1) use a separate stylesheet for IE6 (and bind this hover function ONLY for IE6)

2) use .hover (instead of :hover) anywhere you need it. However, you should consider that you may have some performance leaks if you do this way.

instead of:

tr:hover td {background:red}

you will have:

tr.hover td,
tr:hover td {background:red}
Ionut Staicu
i tried that and i didn't/wasn't getting the effect I wanted. so I did this and it works great!http://www.chohoh.com/pcs/jquery.hover.example.html
miss chohoh
miss chohoh, can you just accept the answer you finally provided. That way people like Ionut won't keep coming and trying to answer a problem you already solved. ( and down voting my attempts at helping you... )
Brian Gianforcaro