Skip to main content

Bug Tracker

Side navigation

#10389 closed bug (invalid)

Opened September 30, 2011 02:14PM UTC

Closed September 30, 2011 08:12PM UTC

Selector by pattern in parents

Reported by: Owned by:
Priority: undecided Milestone:
Component: selector Version: 1.7b1
Keywords: Cc:
Blocked by: Blocking:

Selecting elements by patteren as $(this).parents("div[ @id ^= 'tc-' ]") not working in jqeury version 1.6.4 but it worked in jquery 1.2.3b.

The below code can be tested:

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "">



<title>jQuery Attribute Predicate Demo</title>

<script type="text/javascript" src="lib/jquery.js"></script>




p = $(this).parents("div[ @id ^= 'tc-' ]");







<div id="tc-2">111



<div id="start" style="color: red;">Press me</div>



<div id="print"></div>



Attachments (0)
Change History (3)

Changed September 30, 2011 02:17PM UTC by rwaldron comment:1

component: unfiledselector
owner: →
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:

Open the link and click to "Fork" (in the top menu) to get started.

Changed September 30, 2011 02:29PM UTC by comment:2

status: pendingnew

I have saved the code in

But in local test the code works in jquery version 1.2 but not works in ver.: 1.6.

In in both version of jquery is not working!

Changed September 30, 2011 08:12PM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

This is a question for the forum, not the bug tracker. Remove the @ .