Opened 13 years ago
Closed 12 years ago
#6600 closed bug (worksforme)
Jquery - selector not selecting Id's when having periods in IE, even when perios id escaped with \\
Reported by: | Jkb | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | selector | Version: | 1.4.2 |
Keywords: | selector IE periods | Cc: | |
Blocked by: | Blocking: |
Description
In IE, The selector for multiple inputs is not working whereas in firefox it is. Below is the html.
<td><input id="contactInfo.shippingAddress.city" name="contactInfo.shippingAddress.city" onchange="needToConfirm = true;" type="text" value="city" maxlength="100"/></td>
If selector is written as
$("*[id='contactInfo
.shippingAddress']").val("");
It doesn't work
But if written as $("*[id='contactInfo.shippingAddress']").val(""); - it works..
But jquery documentation says, periods must be escaped with
Reference -> http://forum.jquery.com/topic/jquery-selector-not-selecting-multiple-checkboxes-ie
Attachments (1)
Change History (2)
Changed 13 years ago by
comment:1 Changed 12 years ago by
Priority: | → undecided |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
In the above test case, it's not necessary to escape the ID in order to create a selector that can select all of the relevant elements desired. Although a period is present, this can be easily handled using a more advanced selector such as this: http://jsfiddle.net/65DKY/1/
As you can see, this handles multiple elements without any problem.
Just to confirm as well: Using the correct selector (as provided above) you *can* still escape the periods if needed without any loss in functionality.
Closing as this should be resolved now.
selector not working when id containing period is escaped