From 542da06c3e3542126cd54282d35ab1a3120f2d57 Mon Sep 17 00:00:00 2001 From: Ben Marvell Date: Mon, 3 Sep 2012 11:10:19 +0100 Subject: [PATCH] Code example was broken. Added missing closing bracket to example. --- entries/index.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/index.xml b/entries/index.xml index 3cdef58d..cc7b2cd9 100644 --- a/entries/index.xml +++ b/entries/index.xml @@ -68,7 +68,7 @@ alert('Index: ' + listItem.index('li')); Index: 1

If we omit the argument, .index() will return the position of the first element within the set of matched elements in relation to its siblings:

-
alert('Index: ' + $('#bar').index();
+
alert('Index: ' + $('#bar').index());

Again, we get back the zero-based position of the list item:

Index: 1