$('.mui-table-view>.mui-table-view-cell').on('tap', function() { var checked = $(this).find('input').prop("checked"); if (checked) { $(this).find('input').removeProp("checked"); checked = $(this).find('input').prop("checked"); userNameArr.remove($(this).find('label').text()); userIdArr.remove($(this).find('input').val()); }else { if($.inArray($(this).find('label').text(),userNameArr)<0){ $(this).find('input').prop("checked",true); checked = $(this).find('input').prop("checked"); userNameArr.push($(this).find('label').text()); userIdArr.push($(this).find('input').val()); } }});代码如上。在移动端上,点击相关项,样式并未及时发生变化。请问是jQuery在移动端作DOM操作的效率太低导致的吗?样式虽然没有及时变化,但数组操作是及时的。
添加回答
举报
0/150
提交
取消