, . , .
index.html:
document.addEventListener('ons-carousel:postchange', function(event){
if (event.activeIndex === 1) {
rangeTouchEvents();
}
});
, , : (: .js, index.html)
function rangeTouchEvents()
{
ons.ready(function() {
var range = document.getElementById("range");
range.addEventListener('touchstart', function () {
document.querySelector("ons- carousel").removeAttribute("swipeable");
});
range.addEventListener('touchend', function () {
document.querySelector("ons-carousel").setAttribute("swipeable", "");
});
});
}
:
- , <ons-carousel>. , , , 1. 1 , ( ). 1, , .
"range". , , "false". , . "true".
, "touchStart" "touchEnd" - onsen. <ons-page> ( , , .) index.html, , "" , 1, . <ons-carousel>, , 1 . , , .
@AndiPavlio @FranDios