Bug Tracker

Modify

Ticket #7153 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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>

Change History

comment:1 Changed 3 years ago by john

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

This was fixed in jQuery 1.4.3.

comment:2 Changed 3 years ago by john

  • Component changed from unfiled to selector

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.