ryrych/rcarousel — pull request #64 by jasonbnewell (2013-03-11 06:13:24+00:00)
Title: Added "seamless" page transition option

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.

Because so many extra pages are created, the user should explicitly state if they want the ACTUAL page count returned. By default, only the USEFUL page count comes back. There is an example in 'examples/seamless.html' to illustrate this.

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.