Skip to main content

Bug Tracker

Side navigation

#13716 closed bug (duplicate)

Opened April 03, 2013 02:18AM UTC

Closed April 03, 2013 02:28AM UTC

checkbox attr/removeAttr problems

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:

I believed the bug is involved with the version 1.9.0.

Here is a simple example:



<script src="./jquery-1.9.0.js" type="text/javascript"></script>



<input id="test" type="button" value="click">


<input class="test" type="checkbox" value="a">

<input class="test" type="checkbox" value="b">

<input class="test" type="checkbox" value="c">

<input class="test" type="checkbox" value="d">

<input class="test" type="checkbox" value="e">









$(this).attr('checked', 'checked');





Here are the steps:

1. Click the button, all the elements are checked.

2. Click again, no checked.

3. Click again, the attribute 'checked' is absolutely added, but the box is not checked.

The versions after 1.8.3 have the problem, but the version 1.8.3 is ok.

Attachments (0)
Change History (1)

Changed April 03, 2013 02:28AM UTC by m_gol comment:1

resolution: → duplicate
status: newclosed

Duplicate of #13667.Use prop(), not attr() for this.