I'm using the jQuery Tools scrollable plugin and have been trying to make use of its API to create custom controls. However, I can't get them to work no matter what I do!
I have an autoscrolling, vertical slideshow and want to be able to pause it (or restart it, or move it to a particular place) using my own bespoke elements. Using the code below I am getting a "Uncaught TypeError: Object # has no method 'pause'" error when I click the pause button. What am I doing wrong?
$('document').ready(function() {
$("#scrollable .items").cycle();
$("#tabs").tabs("div.panes > div");
window.api = $("#sideScrollable").scrollable({
vertical: true,
items: "ul",
size: 1,
speed: 4000,
mousewheel: false,
keyboard: false,
circular: true}).navigator().autoscroll(0,{
api: true,
autoplay: true });
$('.pause').click(function() {
api.pause();
return false;
});
});
Thanks so much for your help.