Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
30184 Points
4906 Posts
May 21, 2012 08:19 AM|LINK
Hi,
I think you are looking for animation file below-
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <style> td{padding:10px;} </style> <script type="text/javascript"> var oldcolor; $(document).ready(function () { $("table tr:odd").css("background-color", "red"); $("table tr:even").css("background-color", "gray"); $("table tr").mouseover(function () { oldcolor = $(this).css("background-color"); $(this).css("background-color", "yellow"); }); $("table tr").mouseout(function () { $(this).animate({ backgroundColor: oldcolor }, 1000); }); }); </script> </head> <body> <form id="form1" runat="server"> <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <div> <span><%#Eval("State_Name")%></span><br /> <span><%#Eval("Country_Name")%></span> </div> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </form> </body> </html>
asteranup
All-Star
30184 Points
4906 Posts
Re: JavaScript Change Class dont work with alternateColor row!
May 21, 2012 08:19 AM|LINK
Hi,
I think you are looking for animation file below-
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <style> td{padding:10px;} </style> <script type="text/javascript"> var oldcolor; $(document).ready(function () { $("table tr:odd").css("background-color", "red"); $("table tr:even").css("background-color", "gray"); $("table tr").mouseover(function () { oldcolor = $(this).css("background-color"); $(this).css("background-color", "yellow"); }); $("table tr").mouseout(function () { $(this).animate({ backgroundColor: oldcolor }, 1000); }); }); </script> </head> <body> <form id="form1" runat="server"> <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <div> <span><%#Eval("State_Name")%></span><br /> <span><%#Eval("Country_Name")%></span> </div> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </form> </body> </html>Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog