On Friday @kdc retweeted something from @eduguru that sent me to @educheckup where I watched several videos, including the one on Miami-Dade where he mentions one of the few things they did right was pausing the story rotation when you click on a particular number to view a particular story.
Hmm… Do we do that?
New version is out as of last month. Might as well update. Should probably update my version of jQuery while I’m at it. We were still running 1.3. Update both scripts, re-minify our local file (plug in collection and custom code), and make sure nothing breaks.
Background color change on pager links to indicate currently active slide no longer works. Fire up FireBug. Eventually figure out
activeSlide class is being applied to the
li tags rather than the
a tags inside the list items. For our implementation, that means the buttons were being flagged as active rather than the actual pager links. Created a custom function for
updateActivePagerLink and all was well again.
Pshew! We’re in the clear. Checking the docs for Cycle. Source code reveals some new stuff that hasn't made its way onto the web documentation yet. Luckily Mike does a good job of commenting his code. The functionality I need isn’t built in, but a couple of options get close, such as
pauseOnPagerHover. I didn’t have either of those enabled, and
pause has been built-in forever. Learning about one usability gotcha lead me to discover another.
At this point the easy, built in stuff is fixed. I turn my attention back to the initial issue. Following the conventions set up by 2 existing options within the plugin (
onPagerEvent) I create a new option called
pauseOnPagerEvent and insert 2 new lines of code: an
if statement to check the state of the new option and code lifted from
pauseOnPagerHover to actually trigger the pause. Amazingly, this works on the first try.
I’m still not happy with that solution because I think a more elegant way to do it would involve
onPagerEvent. I just spent another hour trying to figure out how to write my own function for that callback and failed yet again.