Skip to main content

Bug Tracker

Side navigation

#7153 closed bug (worksforme)

Opened October 11, 2010 10:52PM UTC

Closed October 11, 2010 11:19PM UTC

Last modified October 11, 2010 11:19PM UTC

attribute selector with namespace does not find valid selectors when used as context or with find().

Reported by: daniel hai Owned by:
Priority: undecided Milestone: 1.4.3
Component: selector Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

original question: http://stackoverflow.com/questions/3910332/jquery-finding-filtering-on-attributes-within-context/3910392#3910392

This works:

returns div, ul, article

console.log($('[ui\\\\:component]'));

These should work, but do not:

these all return nada

console.log($('[ui\\\\:component]', $('body')));

console.log($('body').find('[ui\\\\:component]'));

FILE BELOW:

<html>

<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

</head>

<body>

<div ui:component="component1"></div>

<ul ui:component="component2"></ul>

<article ui:component="component3"></article>

</body>

<script type="text/javascript">

$(document).ready(function() {

returns div, ul, article

console.log($('[ui\\\\:component]'));

these all return nada

console.log($('[ui\\\\:component]', $('body')));

console.log($('body').find('[ui\\\\:component]'));

console.log($('body').filter('[ui\\\\:component]'));

console.log($('body').find('*').filter('[ui\\\\:component]'));

});

</script>

</html>

Attachments (0)
Change History (2)

Changed October 11, 2010 11:19PM UTC by john comment:1

resolution: → worksforme
status: newclosed

This was fixed in jQuery 1.4.3.

Changed October 11, 2010 11:19PM UTC by john comment:2

component: unfiledselector