Skip to content

Commit

Permalink
Issue 130: onBeforeSeek is no longer triggered when scrollable is ini…
Browse files Browse the repository at this point in the history
…tialized
  • Loading branch information
tipiirai committed Aug 15, 2010
1 parent d0bd5dc commit bcd8568
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/scrollable/scrollable.js
Expand Up @@ -223,7 +223,7 @@
});

// seek over the cloned item
self.seekTo(0, 0);
self.seekTo(0, 0, function() {});
}

// next/prev buttons
Expand Down Expand Up @@ -278,7 +278,9 @@
}

// initial index
$(self).trigger("onBeforeSeek", [conf.initialIndex]);
if (conf.initialIndex) {
self.seekTo(conf.initialIndex, 0, function() {});
}
}


Expand Down
5 changes: 3 additions & 2 deletions test/scrollable/single.html
Expand Up @@ -6,8 +6,9 @@

<script>
$(function() {
$(".scrollable").scrollable({ circular: true });

$(".scrollable").scrollable({ circular: false, initialIndex: 2, onBeforeSeek: function() {
console.info("jou");
}});
});
</script>

Expand Down

0 comments on commit bcd8568

Please sign in to comment.