代碼不對,按老師的寫的啊
$(document).ready(function(){ ? ?$("#strHref").toggle(function(){ ? ? ? ?$(this).text('收起-'); ? ? ? ?$('#hpn').show(1000); ? ?},function(){ ? ? ? ?$(this).text('更多選項(xiàng)+'); ? ? ? ?$('#hpn').hide(1000); ? ?}); }); 按老師的代碼寫的,怎么不對,請問哪里有錯嗎
2018-09-08
toggle() 方法在 jQuery 版本 1.8 中被廢棄,在版本 1.9 中被移除,之后的版本這個函數(shù)被淘汰了
2016-11-28
你的jq引的是第幾版的?