|
发表于 2017-9-7 17:50:08
|
显示全部楼层
你的问题我结局了!
主要是在list 的触摸事件中实现 class属性 的动态添加和 删除即可
Model.prototype.list6Touchstart = function(event){
//开始
var classValue = event.currentTarget.getAttribute('class');
event.currentTarget.setAttribute('class',classValue+" x-scroll-h");
};
Model.prototype.list6Touchend = function(event){
var classValue = event.currentTarget.getAttribute('class');
var index = classValue.indexOf("x-scroll-h");
var newValue = classValue.substring(0,index);
event.currentTarget.setAttribute('class',newValue);
//结束
};
|
|