javascript - jQuery Add Code To Existing Objects Function Call Back -
in page i'm using jquery countdown plugin. page has function in finish.countdown event. current code is:
$this.countdown(finaldate).on('update.countdown', function(event) { //set actual time var format = '<span>%h<strong>'+t_hour+'%!h:'+t_plural+';</strong></span><span>%m<strong>'+t_min+'</strong></span><span>%s<strong>'+t_sec+'</strong></span>'; //send time countdown $(this).html(event.strftime(format)); }).on('finish.countdown', function(event) { //countdown done - add ended class container $(this).addclass('ended'); });
i not have access code generating code - can add own separate javascript page.
is there way attach additional function / line of code finish.countdown event?
i.e. if wanted console.log("done");
when timer complete can / how attach object - without modifying original jquery?
thanks!
Comments
Post a Comment