Skip to main content

Bug Tracker

Side navigation

#9315 closed bug (duplicate)

Opened May 17, 2011 03:02PM UTC

Closed May 17, 2011 03:13PM UTC

Last modified March 14, 2012 06:08AM UTC

$('#myElement').attr('checked') does not work for checkbox inputs for Chrome

Reported by: anonymous Owned by:
Priority: low Milestone:
Component: attributes Version: 1.6
Keywords: Cc:
Blocked by: Blocking:

Using jQuery 1.6.0 and Chrome 11.0.696.68, $('#myElement').attr('checked') is undefined when myElement is unchecked.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
    <script type="text/javascript" src=""></script>

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $('#cb').change(function () {
                window.alert("value: " + $('#cb').attr('checked').toString());

    <input type="checkbox" id="cb" name="cb" />
Attachments (0)
Change History (3)

Changed May 17, 2011 03:09PM UTC by anonymous comment:1

jsFiddle link to the code:

Changed May 17, 2011 03:13PM UTC by timmywil comment:2

component: unfiledattributes
priority: undecidedlow
resolution: → duplicate
status: newclosed

Changed May 17, 2011 03:13PM UTC by timmywil comment:3

Duplicate of #9191.