Side navigation
#9861 closed bug (invalid)
Opened July 19, 2011 12:45PM UTC
Closed August 03, 2011 07:44AM UTC
Last modified March 14, 2012 03:56AM UTC
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: | ||
Blocked by: | Blocking: |
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>
Attachments (0)
Change History (2)
Changed July 19, 2011 01:12PM UTC by comment:1
component: | unfiled → css |
---|---|
owner: | → anonymous |
priority: | undecided → low |
status: | new → pending |
Changed August 03, 2011 07:44AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | pending → closed |
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!
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.