모바일 메인 슬라이드 2개 일 때 오동작 수정
This commit is contained in:
12
js/swipe.js
12
js/swipe.js
@ -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 )
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user