Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12953 closed bug (duplicate)

index() does not search using [attr=value] selectors

Reported by: xorax Owned by: xorax
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


it seems jquery incorrectly handles selectors in index() method. To demonstrate the issue I have created a code sample

<!DOCTYPE html>
  <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
  <script type="text/javascript">
      // this works

      //this doesnt
  <p data-custom-id="342">
  <p data-custom-id="36">
  <p data-custom-id="57647">
  <p data-custom-id="433">


Change History (5)

comment:1 Changed 10 years ago by Rick Waldron

Owner: set to xorax
Status: newpending

Attribute selectors require quotes around the value

comment:2 Changed 10 years ago by xorax

Status: pendingnew

with quotes it does not work as well

comment:3 Changed 10 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #12792.

comment:4 Changed 10 years ago by xorax

I do not agree this bug is duplicate of #12792!

In my case index() does not work at all. It returns -1 when filter() with the same parameters returns non-empty set.

Shouldn't index() and filter() work in a similar way?

comment:5 Changed 10 years ago by dmethvin

No. Ask for help on the forum.

Note: See TracTickets for help on using tickets.