effects on Android mobile devices:
:
attached code:
data:{
iconMove:"./images/icon_move_right.png",
}
mounted:function () {
var that=this;
//
var right_div2 = document.getElementById("right_div2");
right_div2.onscroll = function(){
var right_div2_top = this.scrollTop;
var right_div2_left = this.scrollLeft;
document.getElementById("left_div2").scrollTop = right_div2_top;
document.getElementById("right_div1").scrollLeft = right_div2_left;
};
//
$(document).ready(function() {
$("-sharpright_div1").on("scroll", function(e) {
if ($(this).scrollLeft() === 0) {
// console.log("");
that.iconMove="./images/icon_move_right.png";
}
if (($(this).width() + $(this).scrollLeft()) === ($("-sharpright_divx").width())) {
// console.log("");
that.iconMove="./images/icon_move_left.png";
}else {
// console.log($(this).width() + $(this).scrollLeft())
// console.log($(this).scrollLeft())
}
})
});
},
problem: there is no problem in Android devices, and it can be triggered normally, but there will be no effect in IOS. The icon has been pointing to the right. I hope you can give me a solution ~
.