javascript - Automatic Bootstrap Tabs -


i want bootstrap tabs automatically tab when tab clicked want tabbing pause amount of time or stop completely. here piece of javascript using.

    var timer = null,      interval = 1000,     value = 0;  $("#start").click(function() {   if (timer !== null) return;   timer = setinterval(function () {       value = value+1;       $("#input").val(value);   }, interval);  });  $("#stop").click(function() {   clearinterval(timer);   timer = null }); 

if have not solved ... here fiddle can check.

// tab click event handler $('a').on('click', function (e) {     e.preventdefault();     // stop cycle     clearinterval(tabcycle);     // show clicked tabs associated tab-pane     $(this).tab('show');     // start cycle again in predefined amount of time     settimeout(function () {         //tabcycle = setinterval(tabchange, 5000);     }, 15000); }); 

http://jsfiddle.net/ahlyz/1/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -