第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

jquery hide() show()

點(diǎn)擊button后對(duì)象開始hide和show 在hide和show過程中再次點(diǎn)擊 再show結(jié)束后 會(huì)再一次進(jìn)行hide 怎么讓它只進(jìn)行一次

正在回答

5 回答

//jquery回調(diào)函數(shù)
<script?type="text/javascript">
????var?Blean=false;
????$("button").click(function(){
????????if(Blean==false){
????????????$("#a1").hide(3000).show(3000,function(){
????????????????Blean=true;
????????????});
????????}
????});
</script>

禁用按鈕

<script>
????$("button").click(function(){
????????$("#a1").hide(3000).show(3000);
????????$(this).attr("disabled","disabled")
????});
</script>

學(xué)到了感謝上面的兩位

0 回復(fù) 有任何疑惑可以回復(fù)我~

就像這樣呢,我嘗試是ok的

????<script?type="text/javascript">
	var?click_flag?=?0;
????//點(diǎn)擊button
????//執(zhí)行3秒隱藏
????//執(zhí)行3秒顯示
????$("button").click(function()?{
????????if(!click_flag){
			click_flag?=?1;
			$("#a1").hide(3000).show(3000,function(){
					click_flag?=?0;
				})
		}
????});
????</script>


0 回復(fù) 有任何疑惑可以回復(fù)我~

可以布爾值click_flag=0,click后flag=1,當(dāng)show()完成回調(diào)函數(shù)使flag再為0。那么click事件加一個(gè)if(!flag)判斷不就行了?

0 回復(fù) 有任何疑惑可以回復(fù)我~

也許你可以在點(diǎn)擊后將按鈕 禁用

?$("button").click(function() {

? ? ? ? $("#a1").hide(3000).show(3000);

? ? ? ? $(this).attr("disabled","disabled");

? ? });


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉1888 提問者

這樣的話就點(diǎn)不了了
2016-07-13 回復(fù) 有任何疑惑可以回復(fù)我~
#2

Cassie_yu 回復(fù) 慕粉1888 提問者

對(duì)啊 點(diǎn)一次就不能點(diǎn)了啊~
2016-07-13 回復(fù) 有任何疑惑可以回復(fù)我~

$("button").click(function() {
??????? $("#a1").toggle(1500);
??? });

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉1888 提問者

一樣的 一直點(diǎn)按鈕就會(huì)一直show&hide
2016-07-11 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

jquery hide() show()

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)