Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7813 closed bug (duplicate)

problems with selector for multiple checkboxes ?

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

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 (2)

comment:1 Changed 9 years ago by jitter

Resolution: duplicate
Status: newclosed

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 9 years ago by jitter

Duplicate of #7539.

Note: See TracTickets for help on using tickets.