모바일 메인 슬라이드 2개 일 때 오동작 수정

This commit is contained in:
chicpro
2014-04-29 16:32:36 +09:00
parent 9c0be856d5
commit 0fe3fc43df
3 changed files with 4 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -14,10 +14,10 @@
stopPropagation: false,
callback: function(index, element) {
tab_change(index);
idx = index;
},
transitionEnd: function(index, element) {
set_height(index);
idx = index;
}
};

View File

@ -3,6 +3,7 @@
*
* Brad Birdsall
* Copyright 2013, MIT License
* https://github.com/rmoszczynski/Swipe
*
*/
@ -41,14 +42,7 @@ function Swipe(container, options) {
length = slides.length;
// set continuous to false if only one slide
if (slides.length < 2) options.continuous = false;
//special case if two slides
if (browser.transitions && options.continuous && slides.length < 3) {
element.appendChild(slides[0].cloneNode(true));
element.appendChild(element.children[1].cloneNode(true));
slides = element.children;
}
if (slides.length <= 2) options.continuous = false;
// create an array to store current positions of each slide
slidePos = new Array(slides.length);
@ -567,4 +561,4 @@ if ( window.jQuery || window.Zepto ) {
});
}
})( window.jQuery || window.Zepto )
}
}