jquery countdown get minutes and seconds -


hi able embed countdown timer here

but here in "miscellaneous" tab there gettime section. said "periods" array , able pick minutes , seconds "periods[5]" minutes , "periods[6]" form seconds (please see documentation here). used same code . able fetch data not behaving array. code:

var min=10; var sec=30;    $('#eachqtimer').countdown({ until: '+' + min + 'm +' + sec + 's', format: 'yowdhms', significant: 2 });   var periods = $('#eachqtimer').countdown('gettimes'); alert(periods); // tried :alert(periods[5]); / alert(periods[5].val()); 

it showing me out put : 0,0,0,0,0,10,30. on alert box. fine. why unable 5 indexed value ? not executing latter single line of code after line , if use : alert(periods[5].value); getting undefined .

add click function.

var min = 10; var sec = 30;  $('#eachqtimer').countdown({    until: '+' + min + 'm +' + sec + 's',    format: 'yowdhms',    significant: 2 });  $('#gettime').click(function() {   var periods = $('#eachqtimer').countdown('gettimes');   alert(periods[6]); }); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -