You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//530-546
// 获取 li 内容
getInnerHtml: function (sliderIndex) {
var _this = this;
var index = _this.getIndex(_this.curDistance[sliderIndex]);
this.setClassActive(sliderIndex);
return _this.slider[sliderIndex].getElementsByTagName('li')[index].innerHTML;
},
// 处理高亮
setClassActive: function (sliderIndex) {
var _this = this;
var _index = _this.getIndex(_this.curDistance[sliderIndex]);
var _lists = _this.slider[sliderIndex].getElementsByTagName('li');
for (let i = 0; i < _lists.length; i++) {
_lists[i].className = "";
}
_lists[_index].className = 'inactive';
},
改2
// 688-699
// 监听
addListenerAll: function () {
var _this = this;
for (let index = 0; index < _this.slider.length; index++) {
//手势监听
(function (index) {
var sliderLists = _this.slider[index].getElementsByTagName('li');
sliderLists[_this.initPosition].className = 'inactive';
_this.addListenerWheel(_this.wheel[index], index);
})(index);
}
},
这个能设置当前选中的文字颜色么?
The text was updated successfully, but these errors were encountered: