$(function() {

$("#myid").hover(function() {
// when mouse is over element
}, function() {
//  else
});

});

On Fri, May 15, 2009 at 9:22 AM, Karthikraj <karthik271...@gmail.com> wrote:

>
> But CSS :hover will not work in IE6. So better use script....
>
> On May 15, 9:26 am, RobG <rg...@iinet.net.au> wrote:
> > On May 15, 11:35 am, Calvin <cstephe...@gmail.com> wrote:
> >
> > >   Hi,
> >
> > >   I was able to get this script to work and was wondering if there was
> > > a better/proper/more efficient way of writing it. Here is the script:
> >
> > >   $(document).ready(function() {
> > >       $('li.a').hover(function() {
> > >          $(this).addClass('move');
> > >   });
> > >     $('li.a').mouseLeave(function() {
> > >        $(this).removeClass('move');
> > >   )};
> > > )};
> >
> > Use the CSS a:hover pseudo-class and set your style rules there, no
> > script required.
> >
> >   li a:hover {
> >     /* insert rules */
> >   }
> >
> > <URL:http://www.w3.org/TR/CSS2/selector.html#x32>
> >
> > --
> > Rob

Reply via email to