Mouse Hover Event Of Control Using JQuery

By Goniey N (Mr. G)

Code For How To Mouse Hove Event Will Fire & Change The Background Color Of The Control...

<script type="text/javascript">

$(document).ready(function()
{
          //Event Fire When User Mouse Hover To Button...
          $("#MyButton").hover(function()
          {
                    //When Mouse Hover To The Button The Background Color Of Button Will Be "lightblue"...
                    $("#MyButton").css("background-color","lightblue");
          },function()
          {
                    //Otherwise Background Color Of Button Will Be "lightgreen"...
                    $("#MyButton").css("background-color","lightgreen");
          });
});

</script>

<input id="MyButton" type="button" value="Mouse Hover Event Effect"/>

Mouse Hover Event Of Control Using JQuery  (1089 Views)