demo在這里:https://jsfiddle.net/wz9xs5g5/通過jquery添加一個下拉框時,一開始的下拉框點擊一下會馬上顯示然后隱藏是怎么回事?通過firbug顯示觸發了兩次,不知是什么原因造成的?function start(){ $(".button").click(function() { $(this).next().toggle(function(){ $(this).next('.textCon').show(); },function(){ $(this).next('.textCon').hide(); });});}start();$("button").click(function() { console.warn("haha"); $("body").append($(".box")[0].innerHTML); start();});
jquery 點擊下拉框出現的問題?
喵喔喔
2018-09-14 10:10:19