jmpressjs / jmpress.js

A jQuery plugin to build a website on the infinite canvas
http://jmpressjs.github.com/jmpress.js
1.5k stars 237 forks source link

Return next item without stepping #167

Open mcshaman opened 9 years ago

mcshaman commented 9 years ago

It would be great if next and prev methods could be used to return the next and previous steps without stepping. I am currently having to traverse the DOM and check for excludes. I'm surprised this functionality isn't already available.

sokra commented 9 years ago

Maybe this works:

var activeSlice = $("#jmpress").jmpress("active");
var nextSlice = $("#jmpress").jmpress("fire", "selectNext", activeSlice, {
  stepData: activeSlice.data('stepData')
});