Skip to main content

Bug Tracker

Side navigation

#10143 closed bug (invalid)

Opened August 26, 2011 10:28AM UTC

Closed August 26, 2011 01:39PM UTC

Checkboxes can't be checked with .toggle(function, function)

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

When I click the checkbox on this page with my mouse the callbacks are fired but the checkbox isn't checked, I assume that preventDefault is being called somewhere but shouldn't be.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
    <script type="text/javascript" src=""></script>
        <input type="checkbox" id="foo" value="bar" name="baz" />
    <script type="text/javascript">
    $(document).ready(function() {
            function() {
                console.log('toggled 1');
            function() {
                console.log('toggled 2');

Attachments (0)
Change History (2)

Changed August 26, 2011 10:32AM UTC by comment:1

This shows the problem

Changed August 26, 2011 01:39PM UTC by timmywil comment:2

component: unfiledevent
priority: undecidedlow
resolution: → invalid
status: newclosed

This is the intended behavior. From the docs:

"The implementation also calls .preventDefault() on the event, so links will not be followed and buttons will not be clicked if .toggle() has been called on the element."