вопрос
Здравствуйте. Не силен в js, поэтому прошу помощи:
Где в этом js настраивается частота смены сайда?
Где в этом js настраивается частота смены сайда?
(function(c){
c.Slider=function(a,b){
this.$el=c(b);
this._init(a)};
c.Slider.defaults={
current:0,bgincrement:100,autoplay:1,interval:6E3};
c.Slider.prototype={
_init:function(a){
this.options=c.extend(!0,{
},c.Slider.defaults,a);
this.$slides=this.$el.children("div.da-slide");
this.slidesCount=this.$slides.length;
this.current=this.options.current;
if(0>this.current||this.current>=this.slidesCount)this.current=0;
this.$slides.eq(this.current).addClass("da-slide-current");for(var a=c('<nav class="da-dots"/>'),
b=0;
b<this.slidesCount;
++b)a.append("<span/>");
a.appendTo(this.$el);
this.$pages=this.$el.find("nav.da-dots > span");
this.$navNext=this.$el.next().find("span.da-arrows-next");
this.$navPrev=this.$el.next().find("span.da-arrows-prev");
this.isAnimating=!1;
this.bgpositer=0;
this.cssAnimations=Modernizr.cssanimations;
this.cssTransitions=Modernizr.csstransitions;
(!this.cssAnimations||!this.cssAnimations)&&this.$el.addClass("da-slider-fb");
this._updatePage();
this._loadEvents();
this.options.autoplay&&this._startSlideshow()}
,
_navigate:function(a,b){
var c=this.$slides.eq(this.current),e,g=this;
if(this.current===a||this.isAnimating)return!1;
this.isAnimating=!0;
var h,i,d;
b?d=b:a>this.current?d="next":d="prev";
this.cssAnimations&&this.cssAnimations&&("next"===d?(h="da-slide-toleft",i="da-slide-fromright",++this.bgpositer):(h="da-slide-toright",i="da-slide-fromleft",--this.bgpositer),this.$el.css("background-position",this.bgpositer*this.options.bgincrement+"% 0%"));
this.current=a;
e=this.$slides.eq(this.current);
this.cssAnimations&&
this.cssAnimations&&(c.removeClass("da-slide-toleft da-slide-toright da-slide-fromleft da-slide-fromright"),e.removeClass("da-slide-toleft da-slide-toright da-slide-fromleft da-slide-fromright"),c.addClass(h),e.addClass(i),c.removeClass("da-slide-current"),e.addClass("da-slide-current"));
if(!this.cssAnimations||!this.cssAnimations)e.css("left","next"===d?"100%":"-100%").stop().animate({
left:"0%"}
,1E3,function(){
g.isAnimating=!1}
),c.stop().animate({
left:"next"===d?"-100%":"100%"}
,1E3,function(){
c.removeClass("da-slide-current")}
);
this._updatePage()}
,_updatePage:function(){
this.$pages.removeClass("da-dots-current");
this.$pages.eq(this.current).addClass("da-dots-current")}
,_startSlideshow:function(){
var a=this;
this.slideshow=setTimeout(function(){
var b=a.current<a.slidesCount-1?b=a.current+1:b=0;
a._navigate(b,"next");
a.options.autoplay&&a._startSlideshow()}
,this.options.interval)}
,page:function(a){
if(a>=this.slidesCount||0>a)return!1;
this.options.autoplay&&(clearTimeout(this.slideshow),this.options.autoplay=!1);
this._navigate(a)}
,
_loadEvents:function(){
var a=this;
this.$pages.on("click.cslider",function(){
a.page(c(this).index());
return!1}
);
this.$navNext.on("click.cslider",function(){
a.options.autoplay&&(clearTimeout(a.slideshow),a.options.autoplay=!1);
var b=a.current<a.slidesCount-1?b=a.current+1:b=0;
a._navigate(b,"next");
return!1}
);
this.$navPrev.on("click.cslider",function(){
a.options.autoplay&&(clearTimeout(a.slideshow),a.options.autoplay=!1);
var b=0<a.current?b=a.current-1:b=a.slidesCount-1;
a._navigate(b,"prev");
return!1}
);
if(this.cssTransitions)if(this.options.bgincrement)this.$el.on("webkitTransitionEnd.cslider transitionend.cslider OTransitionEnd.cslider",function(b){
b.target.id===a.$el.attr("id")&&(a.isAnimating=!1)}
);
else this.$el.on("webkitAnimationEnd.cslider animationend.cslider OAnimationEnd.cslider",function(b){
if("toRightAnim4"===b.originalEvent.animationName||"toLeftAnim4"===b.originalEvent.animationName)a.isAnimating=!1}
)}
};
var g=function(a){
this.console&&console.error(a)};
c.fn.cslider=function(a){
if("string"===
typeof a){
var b=Array.prototype.slice.call(arguments,1);
this.each(function(){
var f=c.data(this,"cslider");
f?!c.isFunction(f[a])||"_"===a.charAt(0)?g("no such method '"+a+"' for cslider instance"):f[a].apply(f,b):g("cannot call methods on cslider prior to initialization; attempted to call method '"+a+"'")}
)}
else this.each(function(){
c.data(this,"cslider")||c.data(this,"cslider",new c.Slider(a,this))}
);
return this}
})(jQuery);