亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

手風琴特效的按鈕怎么實現點擊后更換

手風琴特效的按鈕怎么實現點擊后更換

WongChouchan 2017-09-17 13:13:26
HTML:?<div class="tdg2-peo">? ? ? ? ? ? ? ? ? ? <div class="tdg2-peo-top">? ? ? ? ? ? ? ? ? ? ? ? <span>鄭杰雄</span>? ? ? ? ? ? ? ? ? ? ? ? <span class="td-job">技術戰略官</span>? ? ? ? ? ? ? ? ? ? ? ? ? ?<div class="td-close2" onclick=""></div>? ? ? ? ? ? ? ? ? ? ? ? </div>? ? ? ? ? ? ? ? ? ? ? ? <p class="tdg2-peo-bottom" >111111</p>??</div>CSS:.td-close2{ background-image:url(../images/tdgl-bottom1.png); width:17px; height:7px; position:absolute; right:0px; bottom:8px; cursor:pointer;}.td-open2{ background-image:url(../images/tdgl-top1.png)}JS:?$(".tdg2-peo-top").click(function(){ $(this).nextAll(".tdg2-peo-bottom").slideToggle(200).parent().siblings().children(".tdg2-peo-bottom").slideUp(200); $(this).children(".td-close2").toggleClass("td-open2").siblings(".tdg2-peo-top").removeClass("td-open2")? ? });手風琴特效 已經能夠實現點擊1的時候展開再點擊按鈕變回原來的樣子后收縮起內容。但是就是點擊2時1內容能正常收起但是1按鈕沒有恢復成原來的樣子。麻煩各位幫忙看看是哪里出錯了嗎? 萬分感謝!
查看完整描述

1 回答

?
QQ_隨意

TA貢獻51條經驗 獲得超28個贊

? ? ? ? $(this).children(".td-close2").toggleClass("td-open2");

? ? ? ? $(this).parent().siblings().children(".tdg2-peo-top").children(".td-close2").removeClass("td-open2");

你看這樣可以?

查看完整回答
反對 回復 2018-01-12
  • 1 回答
  • 1 關注
  • 1692 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號