모바일 메인 슬라이드 2개 일 때 오동작 수정
This commit is contained in:
1
js/jquery.touchSwipe.min.js
vendored
1
js/jquery.touchSwipe.min.js
vendored
File diff suppressed because one or more lines are too long
@ -14,10 +14,10 @@
|
|||||||
stopPropagation: false,
|
stopPropagation: false,
|
||||||
callback: function(index, element) {
|
callback: function(index, element) {
|
||||||
tab_change(index);
|
tab_change(index);
|
||||||
idx = index;
|
|
||||||
},
|
},
|
||||||
transitionEnd: function(index, element) {
|
transitionEnd: function(index, element) {
|
||||||
set_height(index);
|
set_height(index);
|
||||||
|
idx = index;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
12
js/swipe.js
12
js/swipe.js
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Brad Birdsall
|
* Brad Birdsall
|
||||||
* Copyright 2013, MIT License
|
* Copyright 2013, MIT License
|
||||||
|
* https://github.com/rmoszczynski/Swipe
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -41,14 +42,7 @@ function Swipe(container, options) {
|
|||||||
length = slides.length;
|
length = slides.length;
|
||||||
|
|
||||||
// set continuous to false if only one slide
|
// set continuous to false if only one slide
|
||||||
if (slides.length < 2) options.continuous = false;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create an array to store current positions of each slide
|
// create an array to store current positions of each slide
|
||||||
slidePos = new Array(slides.length);
|
slidePos = new Array(slides.length);
|
||||||
@ -567,4 +561,4 @@ if ( window.jQuery || window.Zepto ) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})( window.jQuery || window.Zepto )
|
})( window.jQuery || window.Zepto )
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user