$(function() {
let tabs = $('.weui_tab_content');
tabs.removeClass('weui_tab_content_active');
$(this).addClass('weui_tab_content_active');
});
dom is:
<div class="weui_tab_content weui_tab_content_active">
<div class="x_wrap">
<div class="x_scroll">
<ul ng-init="dataset=['蔬菜', '禽蛋肉类', '河鲜海鲜', '米油', '店铺', '野味', '村味', '村味1', '村味2', '村味12', '村味24']">
<li ng-repeat="x in dataset">{{x}}</li>
</ul>
</div>
</div>
</div>
<script>
var myScroll;
$(function() {
console.log('hello fuck');
myScroll = new IScroll('.x_wrap', { scrollX: true, scrollY: false, mouseWheel: true });
});
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
</script>
when I remove the code of
$(function() { let tabs = $('.weui_tab_content'); tabs.removeClass('weui_tab_content_active'); $(this).addClass('weui_tab_content_active'); });
It's ok....
when I remove the code of
$(function() { let tabs = $('.weui_tab_content'); tabs.removeClass('weui_tab_content_active'); $(this).addClass('weui_tab_content_active'); });
It's ok....