點擊div實現(xiàn)toggleClass隱藏和出現(xiàn)功能,為什么隱藏后出不來?$(document).ready(function(){ $('#switcher').click(function(event) { if(event.target == this){$('#switcher button').toggleClass('hidden'); }});});<div id="switcher" class="switcher"> <h3>Style Switcher</h3> <button id="switcher-default"> Default </button> <button id="switcher-narrow"> Narrow Column </button> <button id="switcher-large"> Large Print </button> </div>
您好,求助關(guān)于js toggleClass失靈的問題?
長風(fēng)秋雁
2021-06-15 15:11:25