JamyGolden/PlusSlider — pull request #5 by jordanlev (2011-12-08 02:14:41+00:00)
Title: explicitly cast 'slide' arg of toSlide() to an integer

Fixed bug that occurs when you call toSlide from outside the slider and pass it a number-as-a-string (for example, I was pulling the slide index from an html attribute on my custom pagination controls, using the jquery .attr() function, which returns the attribute as a string, even though it's a number). Without explicitly casting the slide to an integer, the *next* time toSlide() is run the base.currentSlideIndex += 1 does a string concatenation (e.g. "01" or "12" or "23" etc.) instead of addition.