I hacked out a version of this a few months ago and just took the time to build it into your widget properly. This has been tested with all original examples (even ajax) as well as my own version of the examples with the option enabled ("continuous" folder - removed in one of the last commits - you can check them out if you just load up the one before that).
I've tried to keep the code/example style as close to the original as possible. I've also made extra effort to reuse as much of the existing code as I could as well (I went from adding about 100 lines of code to simplifying the original enough that this new version is actually slightly shorter). The paginate function could probably be merged a bit more, but it's pretty close.
I built this feature into the existing code as deep as possible, and was able to avoid a major overhaul. This option works by looping over the elements and generating pages until a page that contains the last STEP elements is created (filled out with the beginning elements). I've added examples in the comments.
I've added an option that will stop page generation before elements begin repeating, along with an example. This is desirable in cases (especially if auto is enabled) where page selection controls are shown to the user instead of prev/next control.
I hope you have the time to review this and add it to this codebase. I've seen that this is a pretty commonly requested feature and I've spent some time ensuring that this addition doesn't break anything.
I hacked out a version of this a few months ago and just took the time to build it into your widget properly. This has been tested with all original examples (even ajax) as well as my own version of the examples with the option enabled ("continuous" folder - removed in one of the last commits - you can check them out if you just load up the one before that).
I've tried to keep the code/example style as close to the original as possible. I've also made extra effort to reuse as much of the existing code as I could as well (I went from adding about 100 lines of code to simplifying the original enough that this new version is actually slightly shorter). The paginate function could probably be merged a bit more, but it's pretty close.
I built this feature into the existing code as deep as possible, and was able to avoid a major overhaul. This option works by looping over the elements and generating pages until a page that contains the last STEP elements is created (filled out with the beginning elements). I've added examples in the comments.
I've added an option that will stop page generation before elements begin repeating, along with an example. This is desirable in cases (especially if auto is enabled) where page selection controls are shown to the user instead of prev/next control.
I hope you have the time to review this and add it to this codebase. I've seen that this is a pretty commonly requested feature and I've spent some time ensuring that this addition doesn't break anything.
Thanks.