Bug Tracker

Modify

Ticket #7813 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

problems with selector for multiple checkboxes ?

Reported by: lingtalfi@… Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, I founded that using the following html :

<div id="test">
    <input type="checkbox" name="multipage[1]" value="" />
</div>

I was able to enable the checkbox using

$("#test").find("input[name=multipage[1]]").attr('checked', true);

and jquery-1.4.2.min.js

Now as of jquery-1.4.4.min.js I tried the folowing codes without success :

$("#test").find("input[name=multipage[1]]").attr('checked', true);
$("#test").find("input[name=multipage\\[1\\]]").attr('checked', true);

Is this a bug or did I not write it correctly ? Thanxs for your answer.

Change History

comment:1 Changed 2 years ago by jitter

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

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

This is a known bug introduced with jQuery 1.4.4. Check the ticket mentioned below for progress on this issue.

You can use the recommended syntax instead and quote the attribute value like this

$("#test").find("input[name='multipage[1]']").attr('checked', true);

comment:2 Changed 2 years ago by jitter

Duplicate of #7539.

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.