Pregunta

I use http://jquerytools.org/documentation/scrollable/ with plugins navigator and autoscrolling for animation of banners. I have such part of the code:

$('.scrollable')
    .scrollable({ 
        circular: true,
        speed: 2000
    })
    .navigator({
        navi: '.navs'
    })
    .autoscroll(5000);

It works nice, but I want to have also opportunity to set delay time after choosing of certain banner (after clicking on one of $('.navs')). Is there any way to make what I want?

UPDATE. I can set $('.scrollable').scrollable({ clickable: false ...})... to stop scrolling at all.But I still want to continue it after certain delay.

http://jsfiddle.net/WqL8T/1/

¿Fue útil?

Solución 2

http://jsfiddle.net/WqL8T/5/ - working example. Thanks to MichaelKaeser. I have just corrected syntax in a right way:

var api = $(".scrollable").data("scrollable");
$('.navs').on('click',function(){
  api.stop();
  var resume = api.play;
  setTimeout(resume, 3000);
});

Otros consejos

Try something like:

var api = $(".scrollable").data("scrollable");

$('.scrollable').on('click',function{
  api.stop();
  var resume = api.play();
  setTimeout(resume, 3000);
});

not tested

Try this:

$(function() {
$('.scrollable').scrollable({ circular: true, speed: 1000 }).navigator({
    navi:'.navs',
    activeClass: 'on'
}).autoscroll({interval: 1000, autopause: false,fireDelay: 800,
interval: 4000});
});
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top