Bug Tracker

Modify

Ticket #10627 (closed bug: worksforme)

Opened 19 months ago

Last modified 19 months ago

since 1.6.3 , $("radio").attr("checked") alway return a string "checked"

Reported by: loohb@… Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

$("radio").attr("checked") alway return a string "checked"

Change History

comment:1 Changed 19 months ago by addyosmani

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to attributes

Please see here for a test case that demonstrates the correct (and expected) behaviour with inputs of type 'radio' and 'checked':  http://jsfiddle.net/EHjFa/. This isn't broken to the best of my knowledge.

comment:2 Changed 19 months ago by dmethvin

If you are trying to find the *currently* checked radio including any change that may have been made by the user, use $("radio").prop("checked") since .attr() represents the state in the HTML markup and is not changed by user actions.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.