Bug Tracker

Modify

Ticket #9569 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

Problem with space-separated attribute selector

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

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']")

Change History

comment:1 Changed 2 years ago by anonymous

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...

comment:2 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to selector

anonymous is right

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.