jQuery: The Write Less, Do More JavaScript Library

Ticket #167 (new )

Opened 2 years ago

Last modified 2 years ago

attr('checked', true) doesn't work

Reported by: mike@… Assigned to: anonymous
Type: Priority:
Milestone: Component:
Version: Keywords: attr, checked
Cc: "" Needs:

Description

$("#method-download").attr('checked', true); doesn't seem to work but $("#method-download").get(0).checked = true; does.

Adding checked: "checked" to the 'fix' hash in the 'jQuery.attr' method gets it working though...

Attachments

Change History

Changed 2 years ago by chocolateboy

  • keywords changed from attr, rev249 to attr, checked
  • priority changed from minor to major
  • version deleted
  • milestone deleted

Also: $('#whatever').attr('checked', false) doesn't work at all for checkboxes or radio buttons on Firefox. See attached test case. Works fine on IE.

Dunno which version to mark this under as the file doesn't say: it's dated as:

2006-08-31 13:26:31 -0400 (Thu, 31 Aug 2006)

Changed 2 years ago by chocolateboy

According to Trac, there's no bug #167, so I can't attach the test case.

Let me know if you want me to forward it.

chocolateboy

Changed 2 years ago by joern

  • status changed from new to closed
  • resolution set to fixed

Added a testcase for this to SVN; The 'fix' hash already contains checked

Changed 2 years ago by http://hometown.aol.de/makehimhard/buy_viagra.html

<a href="http://hometown.aol.de/makehimhard/buy_viagra.html">buy viagra</a> f1ngertest000123

Note: See TracTickets for help on using tickets.