From 41d940a3771788f243406c21a3527b6b23db8a53 Mon Sep 17 00:00:00 2001 From: David Mazza Date: Mon, 26 Nov 2012 12:26:36 -0500 Subject: [PATCH] Handles the case when the click is on an element within an item, such that e.data is an object instead of an array position. In this case, jump should do nothing --- jquery.serialScroll.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jquery.serialScroll.js b/jquery.serialScroll.js index 450683d..2399d57 100644 --- a/jquery.serialScroll.js +++ b/jquery.serialScroll.js @@ -152,7 +152,10 @@ function jump( e, pos ){ if( isNaN(pos) ) pos = e.data; - + // jump should ignore events where e.data (pos) isn't a number + if( typeof pos !== "number" ) + return; + var n, // Is a real event triggering ? real = e.type,