Tuesday 22 May 2012

Changing GridView row Color on mouseover using jQuery

Step 1: Download Jquery file from Here:

Step 2: Add the Jquery file and write Jquery as Given Below:

 
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<head runat="server">
    <title>Grid View</title>
    <script type ="text/javascript">
    $(document).ready(function()
              {
              $("#<%=GridView1.ClientID%> tr").hover(function()
                {
                 $(this).css("background-color", "Lightgrey");
                },
                function()
                {
                $(this).css("background-color", "#ffffff");
                });
              });s
    </script>



1 comment: