$('.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操作的效率太低導致的嗎?樣式雖然沒有及時變化,但數組操作是及時的。
移動端點擊復選框,不出現樣式?
喵喔喔
2019-02-12 21:35:18