Skip to content

Instantly share code, notes, and snippets.

@AliShareei
Last active June 20, 2018 11:51
Show Gist options
  • Save AliShareei/5435bbb2d34819f0732551bff8f58f0a to your computer and use it in GitHub Desktop.
Save AliShareei/5435bbb2d34819f0732551bff8f58f0a to your computer and use it in GitHub Desktop.
رفع مشکل لاینرتایمر و تغییرات فایل dbsap-main.js در ماژول شگفت انگیز
function tabAutoPlay($wrapper,speed) {
var speed = parseInt($wrapper.data('speed')) || 4000;
var linerTimerInterval;
tabTimer = setInterval(function(){
var $titles = $wrapper.find('.dbsa_tab_titles');
var $active = $titles.find('.dbsa_active_title');
var $target = $active.next();
if($target.length){
tabNavigate($target);
if($target.hasClass('dbsa_magic_line')){
tabNavigate($titles.find('li').first());
}
} else {
tabNavigate($titles.find('li').first());
}
clearInterval(linerTimerInterval);
LinerTimerProccess(speed);
},speed);
function LinerTimerProccess(speed) {
var linerSpeed = speed/110;
var elem = document.getElementById("liner_timer");
var width = 3;
elem.style.width = width + '%';
linerTimerInterval = setInterval(function(){
width++;
elem.style.width = width + '%';
}, linerSpeed);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment