JQuery Hover does not work Mozilla

Posted by josephj1989 on Stack Overflow See other posts from Stack Overflow or by josephj1989
Published on 2010-06-15T03:03:52Z Indexed on 2010/06/15 3:12 UTC
Read the original article Hit count: 277

Filed under:
|

I have the following Snippet of code.The hover has a problem in Mozilla - It changes color on hover but some times it does not revert back when we go out.Mind you it only happens sometimes.Also in such cases if I examine the HTML using FireBug I can see that the Extra Class is assigned even after hover is out.It works OK on IE .This is a simplified version

Also as you can see I am setting color on the TR.But this does not change the Color on TextBoxes inside TR. How can I make sure the background color of the Controls contained in the TR is also changed on hover.

 <style type="text/css">
        .HighLight
        {
            background-color:Fuchsia;
        }
        .Select
        {
            border:soild 2px Blue;
            margin:3px;
        }
        </style>
    <script type="text/javascript" src="jquery-1.4.2.js">

    </script>
    <script type="text/javascript">
        $(function() {
        $(".Select").hover(
            function() {
                $(this).addClass("HighLight");
            }, 
            function() {
                $(this).removeClass("HighLight");
            });
        });

My Markup generated by ASP.NET Repeater Control is a table with TR assigned Class Select.

<tr class="Select" >
<td>
<input  type="checkbox" id="chkSelect" />
</td>
<td>
<input name="Repeater1$ctl11$tb" type="text" value="Sharp Bikes" id="Repeater1_ctl11_tb" />
</td>
<td>
<input name="Repeater1$ctl11$tb2" type="text" value="10/13/2004 11:15:07 AM" id="Repeater1_ctl11_tb2" />
</td>
</tr>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery