Skip to content

Instantly share code, notes, and snippets.

@HieuTrungMc
Created April 4, 2020 09:23
Show Gist options
  • Select an option

  • Save HieuTrungMc/8bb7b0902dfa361f9202a0bbb431472a to your computer and use it in GitHub Desktop.

Select an option

Save HieuTrungMc/8bb7b0902dfa361f9202a0bbb431472a to your computer and use it in GitHub Desktop.
( function($) {
$.fn.link2progress = function(seconds, callback){
this.each(function(){
var $this = jQuery(this);
progreso = 100;
timeprogress = seconds*1000;
seconds2 = 0;
$this.animate({
width: progreso+'%'
}, {
duration: 0,
complete: function(scope, i, elem){
if (callback) {
callback.call(this, i, elem );
};
}
});
});
}
$.fn.link2pause = function(){
this.clearQueue();
this.stop();
}
$.fn.link2continue = function(){
this.clearQueue();
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment