Home
Do you use jQuery for making a site come alive?
  v2.0 Posted at 20/10/2010 7:57 PM by System Account
To please customers every business knows they need to keep their services and offerings fresh and up-to-date. The same is true for websites. In order to attract new traffic, we should make the website vivid.
Bad example – there is no response when mouse is over the image
Figure: Bad example – there is no response when mouse is over the image
Good example – apply the different style when mouse is over
Figure: Good example – apply the different style when mouse is over
        
        $("p").hover(function () {
            $(this).css({ "background-color":"yellow", "font-weight":"bolder" }); },
            function () { 
                var cssObj = { "background-color": "#ddd", 
                "font-weight": "", 
                color: "rgb(0,40,244)"
            }
            $(this).css(cssObj);
        }); 
    
Figure: Mouse hover sample

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments: