利用jQuery實現橫向縱向手風琴切換



31 120 41



特效描述:利用jQuery實現 橫向縱向 手風琴切換,利用jQuery實現橫向縱向手風琴切換

代碼結構

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/accordion.css" />

2. 引入JS

<script language="javascript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.msAccordion.js"></script>

3. HTML代碼

<h1>Horizontal Accordion</h1>
<div id="accordionGiftLelo">
  <div class="set">
    <div class="title"><img src="images/DEVIL_EYES_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/devilEyes.jpg" alt="Embroidered Devil Eyes" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set">
    <div class="title"><img src="images/SPRING_EMBROIDERY_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/spring-emroidery.jpg" alt="Spring Embroidery" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set">
    <div class="title"><img src="images/CHARMING_FAIRY_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/charmingFairy.jpg" alt="" width="486" height="198" border="0" /></a> </div>
  </div>
  <div class="set">
    <div class="title"><img src="images/GEOMETRICAL_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/geomatical_embrodery.jpg" alt="Geometrical Embroidery" width="486" height="198" border="0" /></a><br />
    </div>
  </div>
  <div class="set">
    <div class="title"><img src="images/ELEPHANT_LUCK_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/elephant-luck.jpg" alt="Elephant with Luck" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set">
    <div class="title"><img src="images/LADY_RED_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/lady-in-red.jpg" alt="Lady in Red" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set">
    <div class="title"><img src="images/FIREWORKS_ART_1.jpg" width="29" height="198" /></div>
    <div class="content"><a href="#"><img src="images/fireworks-embroidery.jpg" alt="Fireworks Embroidery Art" width="486" height="198" border="0" /></a></div>
  </div>
</div>
<h1>Horizontal Accordion - Automatic Delay 4 sec</h1>
<div class="accordionWrapper" id="accordion1">
<div class="set set1">
    <div class="title"><img src="images/menu1-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-1.jpg" width="486" height="198" /></div>
</div>
<div class="set set2">
    <div class="title"><img src="images/menu2-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-2.jpg" width="486" height="198" /></div>
</div>
<div class="set set3">
    <div class="title"><img src="images/menu3-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-3.jpg" width="486" height="198" />
    </div>
</div>
<div class="set set4">
    <div class="title"><img src="images/menu4-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-4.jpg" width="486" height="198" /><br />
</div>
</div>
<div class="set set5">
    <div class="title"><img src="images/menu5-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-5.jpg" width="486" height="198" /></div>
</div>
<div class="set set6">
    <div class="title"><img src="images/menu6-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-6.jpg" width="486" height="198" /></div>
</div>
<div class="set set7">
    <div class="title"><img src="images/menu7-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-7.jpg" width="486" height="198" /></div>
</div>
</div>
<br />
<h1>Nested Accordion - Click on set 2</h1>
<div class="accordionWrapper" id="accordionNested">
<div class="set set1">
    <div class="title"><img src="images/menu1-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-1.jpg" width="486" height="198" /></div>
</div>
<div class="set set2">
    <div class="title"><img src="images/menu2-h.jpg" width="30" height="198" /></div>
    <div class="content">
    <div id="accordionNestedChild">
  <div class="set set1">
    <div class="title"><img src="images/DEVIL_EYES.jpg" width="198" height="29" /></div>
    <div class="content"><a href="#"><img src="images/devilEyes.jpg" alt="Embroidered Devil Eyes" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set set2">
    <div class="title"><img src="images/SPRING_EMBROIDERY.jpg" width="198" height="29" /></div>
    <div class="content"><a href="#"><img src="images/spring-emroidery.jpg" alt="Spring Embroidery" width="486" height="198" border="0" /></a></div>
  </div>
  <div class="set set3">
    <div class="title"><img src="images/CHARMING_FAIRY.jpg" width="198" height="29" /></div>
    <div class="content"><a href="#"><img src="images/charmingFairy.jpg" alt="" width="486" height="198" border="0" /></a> </div>
  </div>
</div>
    </div>
</div>
<div class="set set3">
    <div class="title"><img src="images/menu3-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-3.jpg" width="486" height="198" />
    </div>
</div>
<div class="set set4">
    <div class="title"><img src="images/menu4-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-4.jpg" width="486" height="198" /><br />
</div>
</div>
<div class="set set5">
    <div class="title"><img src="images/menu5-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-5.jpg" width="486" height="198" /></div>
</div>
<div class="set set6">
    <div class="title"><img src="images/menu6-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-6.jpg" width="486" height="198" /></div>
</div>
<div class="set set7">
    <div class="title"><img src="images/menu7-h.jpg" width="30" height="198" /></div>
    <div class="content"><img src="images/menu-img-7.jpg" width="486" height="198" /></div>
</div>
</div>
<h1> 
Vertical Accordion
</h1>
<div id="accordion3" class="accordionWrapper" style="width:486px;">
<div class="set set1">
    <div class="title"><img src="images/menu1.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-1.jpg" width="486" height="198" /></div>
</div>
<div class="set set2">
    <div class="title"><img src="images/menu2.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-2.jpg" width="486" height="198" /></div>
</div>
<div class="set set3">
    <div class="title"><img src="images/menu3.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-3.jpg" width="486" height="198" /></div>
</div>
<div class="set set4">
    <div class="title"><img src="images/menu4.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-4.jpg" width="486" height="198" /><br />
</div>
</div>
<div class="set set5">
    <div class="title"><img src="images/menu5.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-5.jpg" width="486" height="198" /></div>
</div>
<div class="set set6">
    <div class="title"><img src="images/menu6.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-6.jpg" width="486" height="198" /></div>
</div>
<div class="set set7">
    <div class="title"><img src="images/menu7.jpg" width="198" height="29" /></div>
    <div class="content"><img src="images/menu-img-7.jpg" width="486" height="198" /></div>
</div>
</div>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
						   $("#accordionGiftLelo").msAccordion({defaultid:1});
						   $("#accordion1").msAccordion({defaultid:6, autodelay:4});
						   $("#accordionNested").msAccordion({defaultid:2});
						   $("#accordionNestedChild").msAccordion({defaultid:2, vertical:true});
						   $("#accordion3").msAccordion({vertical:true});
						   }
						   )
</script>
<div style="text-align:center;clear:both">
</div>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: 滾動切換 滾動條切換 滑動選項卡 滑動切換 flash焦點圖 flash幻燈片 flashbanner flash圖片輪播 選項卡切換 選項卡 切換 tab切換 頁面切換 選項卡插件 切換插件 滑動手風琴 焦點圖 幻燈片 輪播圖 bar焦點圖 帶標題的焦點圖 圖片切換 圖片選項卡 圖標選項卡 純圖片輪播 圖片輪播 手風琴 水平手風琴 垂直手風琴 圖片手風琴 文字手風琴 手風琴插件 切換按鈕
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

加群請備注:從官網了解到

湖北30选5开奖结果走势图表