<label class="js_highlight" style="display: inline-block;float: left;width: 50%;"> <div class="compare-top-left-check"> <label class="label-check"><i style="display: none;"></i></label> <span style="margin-left: 20px;"> Hide different items</span> </div> </label>
js: 以上代碼在電腦瀏覽器和安卓上都能觸發alert事件,可是在ios上卻徹底沒有反應 html
$(document).on("click",".js_equal_hide",function(){ var n=~~$(".JS_numshow").html().split("/")[0];
修改js代碼調試: 將兩層的div都加上點擊事件ios
$(".js_equal_hide .compare-top-left-check").click(function () { var n=parseInt($(".JS_numshow").html().split("/")[0]); if(n<2)return false; var $this = $(this).parent();