Skip to main content

Bug Tracker

Side navigation

#6699 closed bug (worksforme)

Opened June 21, 2010 11:07AM UTC

Closed November 01, 2010 08:46PM UTC

Selector context issue on $("tag[attrname=value]", ctxnode)

Reported by: brutuscat Owned by:
Priority: low Milestone:
Component: selector Version: 1.4.2
Keywords: selector, context, attribute Cc: mauroasprea@gmail.com
Blocked by: Blocking:
Description

Hi guys, I am having issues selecting objects using the equals attribute selector within contexts.

I am pasting the output of my Chrome JS console (v - 5.0.375.70)

So the context and html of my context it:

$("select[multiple=multiple]", $("#ui-tabs-2")[0]).context
<div id=​"ui-tabs-2" class=​"ui-tabs-panel ui-widget-content ui-corner-bottom">​
<div id=​"items_panel">​…​</div>​
<div class=​"search_panel">​
<p>​1 - Search for products, add it to your list and get your Product Feed.​</p>​
<form id=​"padre" class=​"ajax-form" methdo=​"POST" action=​"/​index/​search/​net/​zanox/​format/​html">​
<div id=​"search">​…​</div>​
<div id=​"selects">​
<select id=​"region" name=​"region">​…​</select>​
<select name=​"programs[]​" multiple=​"multiple" size=​"5" style=​"width:​30em">​
<option value=​"660">​ zanox AdServer - 660​</option>​
<option value=​"5178">​ Vodafone ES - 5178​</option>​
</select>​
<select id=​"category" name=​"category">​…​</select>​
<label for=​"adspace">​AdSpace​</label>​
<select id=​"adspace" name=​"adspace">​…​</select>​
</div>​
<input name=​"items" value=​"15" type=​"hidden">​
<input name=​"page" value=​"0" type=​"hidden">​
<input name=​"total" value=​"0" type=​"hidden">​
</form>​
<div id=​"results">​</div>​
<div id=​"pagination">​</div>​
</div>​
</div>​

And the query that is FAILING:

$("select[multiple=multiple]", $("#ui-tabs-2")[0]).length
0

Without the context it get it right:

$("select[multiple=multiple]").length
1

And just to be sure the context is unique:

$("#ui-tabs-2").length
1

This seems a bug.... What would you need to further testing?

Regards!

Mauro

Attachments (0)
Change History (1)

Changed November 01, 2010 08:46PM UTC by rwaldron comment:1

milestone: 1.4.2
priority: → low
resolution: → worksforme
status: newclosed

Issue no longer exists; http://jsfiddle.net/rwaldron/QUFqr/1/