cubiq/SwipeView

this.wrapper.clientWidth in function refreshSize is 0 if I new a swipeview but the HTML DOM hasn't rendered.

2hanson opened this issue · 1 comments

this.wrapper.clientWidth in function refreshSize is 0 if I new a swipeview but the HTML DOM hasn't rendered.
such as fellow code:
this.$el.html("

    <div id="swipeview">
    </div>
"); var target = this.$el.find( "#swipeview" )[0]; var carousel = new SwipeView( target, { numberOfPages: slides.length, hastyPageFlip: true }); this code will cause the this.wrapper.clientWidth equal to 0

I fix it by this pull:
#46