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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

一段JQUERY寫的開關(guān)代碼,越寫越迷糊,頭好亂哦,怎么弄?

一段JQUERY寫的開關(guān)代碼,越寫越迷糊,頭好亂哦,怎么弄?

http://jsfiddle.net/CkTRa/2924/onoff開關(guān)下面有一個(gè)on一個(gè)off,off的css里有opacity: 0;我想要得到的效果是,只有一個(gè)是開的,其他都是關(guān)的,然后點(diǎn)擊以后也可以切換ONOFF。單獨(dú)點(diǎn)一個(gè),其他都跟著變,點(diǎn)旁邊的就跟亂套了。我是新手,頭腦轉(zhuǎn)不過(guò)來(lái),不知道怎么寫了,好迷糊,寫亂套了。求助各位大神幫忙!$(document).on('click', '.onoff', function() {  if ($(this).parents().siblings().find('.off').css("opacity") == "0") {        $(this).parents().siblings().find('.on').animate({marginLeft: '+=12px',opacity: 1},250)        .next('.off').animate({marginLeft: '-=12px',opacity: 0}, 250);  };    if (!$(this).hasClass("isonoff")) {        $(this).find('.on').animate({marginLeft: '-=12px',opacity: 0},250)        .next('.off').animate({marginLeft: '+=12px',opacity: 1}, 250);        $(this).addClass("isonoff");  } else {        $(this).find('.on').animate({marginLeft: '+=12px',opacity: 1},250)        .next('.off').animate({marginLeft: '-=12px',opacity: 0}, 250);        $(this).removeClass("isonoff");  };});
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 429 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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