Skip to main content

Bug Tracker

Side navigation

#9569 closed bug (invalid)

Opened June 13, 2011 07:14AM UTC

Closed June 13, 2011 02:06PM UTC

Problem with space-separated attribute selector

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

When using the $ selector for a single attribute, like : $("span[myAttribute1='data']"), it works.

when attempting a 2 attribute selector, like so:

$("span[myAttribute1='data'][myAttribute2='data2']")

it also works.

However, when trying the same selector, with a space between the 2 attributes, it does not find the nodes.

$("span[myAttribute1='data'] [myAttribute2='data2']")

Attachments (0)
Change History (2)

Changed June 13, 2011 10:07AM UTC by anonymous comment:1

i think that the space are used to identify the nested elements...

for example:

$("span[myAttribute1='data'].myspan")

and

$("span[myAttribute1='data'] .myspan")

are different...

because:

  • the second search any elements into "span[myAttribute1='data']" with class "myspan";
  • the first search any "span[myAttribute1='data']" with class "myspan".

it shouldn't be an error...i think...

Changed June 13, 2011 02:06PM UTC by timmywil comment:2

component: unfiledselector
priority: undecidedlow
resolution: → invalid
status: newclosed

anonymous is right