Skip to main content

Bug Tracker

Side navigation

#7906 closed bug (fixed)

Opened January 06, 2011 12:43AM UTC

Closed January 06, 2011 06:36AM UTC

Last modified March 14, 2012 12:20AM UTC

eq() selector not working in 1.4.4 with previous adjacent selectors

Reported by: Owned by:
Priority: low Milestone: 1.5
Component: selector Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

In 1.4.2, the following selector produces a set of one element:

$(".previous + .next p:eq(0)")

However, in 1.4.4 the set is empty.

A simple page to demonstrate the problem is given below.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "">

<html xmlns="" >

<head runat="server">


<script type="text/javascript" src=""></script>

<!-- 1.4.2

<script type="text/javascript" src=""></script>





<div class="previous">


<div class="next">

<p>This is the first text block</p>

<p>This is the second text block</p>



<script type="text/javascript">

$(function() {

$(".previous + .next p:eq(0)").css("color", "red");





Attachments (0)
Change History (2)

Changed January 06, 2011 06:36AM UTC by ajpiano comment:1

resolution: → fixed
status: newclosed

While the bug reporting guidelines mandate that you provide a testcase in jsFiddle, I went ahead and made one in the interest of figuring out if this was a legit issue.

The bad news? It was indeed a bug in 1.4.3 and 1.4.4, and the selector worked in 1.3.2 and 1.2.6, etc.

The good news? It's fixed in the latest revision (GIT 0) !

Changed January 07, 2011 03:57PM UTC by jitter comment:2

component: unfiledselector
milestone: 1.next1.5
priority: undecidedlow