Bug Tracker

Modify

Ticket #9861 (closed bug: invalid)

Opened 22 months ago

Last modified 14 months ago

Problem with ASP.Net-CheckBox-Control and CSS-Class

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: None
Component: css Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

Hello, I observed the following problem. I use ASP.NET and jQuery. When clicking on the checkboxes, the div has to change color. But this only works correcty with the input control. When clicking on the .Net-control, the color only changes to blue, so it does not recognize the true state of the control (active, inactive). The problem only(?) appears when using the css-class-property.

<script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">

        $(document).ready(function() {
            $(".aspCb").click(function() {
                if (this.checked) {
                    $('.example').css('background', '#ffff00');
                }
                else {
                    $('.example').css('background', '#0000ff');
                }
            });

            $(".cb").click(function() {
                if (this.checked) {
                    $('.example').css('background', '#ffff00');
                }
                else {
                    $('.example').css('background', '#0000ff');
                }
            });            
        });
    
    </script>
    
       
   
    <asp:CheckBox ID="aspCb" CssClass="aspCb" runat="server" />
    <input type="checkbox" id="cb" class="cb" />
    <div class="example" style="width:100px; height:100px">text
    </div>

Change History

comment:1 Changed 22 months ago by timmywil

  • Owner set to anonymous
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to css

Thanks for taking the time to contribute to the jQuery project!

If an issue is only experienced when using ASP.NET and the issue is not reproducible with jQuery alone, this is probably not a jQuery issue. However, if it can be reproduced, please provide a reduced test case on  http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge)(or jQuery git) version to ensure the issue still exists.

comment:2 Changed 22 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.