Bug Tracker

Modify

Ticket #8276 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

FireFox 3.6.13 Selecting Form Checkboxes checked items

Reported by: s.hamed.afghan@… Owned by:
Priority: low Milestone: 1.next
Component: css Version: 1.5
Keywords: Cc:
Blocking: Blocked by:

Description

in firefox it doesn't work

$("form :checked").css("border", "1px solid red");

Change History

comment:1 Changed 2 years ago by addyosmani

  • Status changed from new to closed
  • Resolution set to worksforme

Thanks for submitting a ticket to the jQuery Bug Tracker!.

As per our API documentation on :checked, this selector only works correctly for checkbox and radio elements. In your example you're trying to directly use :checked on a form which isn't supported. The correct way to use this would be selecting the input elements by doing something like $('form input:checked'). I've created a minimal fiddle example to demonstrate correct usage here (which does work fine in both latest Chrome and Firefox 3.6.13)  Live Test Case.

comment:2 Changed 2 years ago by jitter

  • Priority changed from undecided to low
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Component changed from unfiled to css

comment:3 Changed 2 years ago by jitter

  • Status changed from reopened to closed
  • Resolution set to duplicate

comment:4 Changed 2 years ago by jitter

Duplicate of #8278.

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.