I’m using the totemticker jQuery plugin, but need to be able to stop it programatically. It doesn’t seem to provide this feature, so I had a look at the source code to see if I could add it myself.
It seems that all I need to do is figure out how to call
base.stop_interval()
However, I can’t seem to make the object that is stored in base accessible to callers. I’ve made a couple of unsuccesful atttempts, but hopefully someone who knows a bit more about how jQuery plugins work can point me in the right direction.
There’s a line in the source here:
What it’s basically doing is making the base object available to the jQuery object through the data function.
Select it with jQuery and call
.data('omr.totemticker')to get thebaseobject out.This is the inspection (In Chrome’s Dev tools) of the demo you linked to.
So calling
$("#vertical-ticker").data("omr.totemticker").stop_interval();should stop the auto-rotation of the ticker.