开发者

Call Preload Function [duplicate]

This question already exists: Closed 11 years ago.

Possible Duplicate:

Preload Function

that is my js code. https://github.com/nathansearles/Slides/blob/master/source/slides.js

   preload : function() {
            $('.slidesContainer').css({
                backgroundImage: "url(img/loading.gif)",
                backgroundPosition: "50% 50%",
                backgroundRepeat: "no-repeat"
            });

            this._loadImage( this.slides.eq( this.options.startAtSlide - 1 ).attr("src") ).then( $.proxy(function( url ) {
          this.slidesCon开发者_如何学Ctrol.fadeIn( this.options.fade.interval );
            this._trigger( "loaded", this.options.startAtSlide, this );

        },this));
    },  

How I can use this code. I am call so $("#slides").slides("preload");. But If I am using $("#slides").slides(); before $("#slides").slides("preload"); that is works. How I can call only preload.?

Thanks..


Since slider is a widget you cannot call preload directly without creating the instance of it which is done by $("#slides").slides();. You can have call it before calling preload to make it work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜