最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery內(nèi)容折疊效果插件用法實例分析(附demo源碼)

 更新時間:2016年04月28日 11:12:19   作者:懶人  
這篇文章主要介紹了jQuery內(nèi)容折疊效果插件用法,結(jié)合實例形式分析了jQuery展開折疊插件jquery.coolfieldset.js的具體使用技巧,并附帶demo源碼供讀者下載參考,需要的朋友可以參考下

本文實例講述了jQuery內(nèi)容折疊效果插件用法。分享給大家供大家參考,具體如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>jQuery Collapsible Fieldset</title>
  <script src="js/jquery.min.js"></script>
  <script language="javascript" type="text/javascript" src="js/jquery.coolfieldset.js"></script>
  <link rel="stylesheet" type="text/css" href="css/jquery.coolfieldset.css" />
</head>
<body>
  <h1>jQuery Collapsible Fieldset</h1>
  <br/>
  <fieldset id="fieldset1" class="coolfieldset">
    <legend>Default</legend>
    <div>
      <p>By default the <b>fieldset</b> is opened or expanded at start. Click on its <b>legend</b> to close or collapse it.</p>
      <p>The code is simply like below</p>
<pre>
$('#fieldset1').coolfieldset();
</pre>
    </div>
  </fieldset>
  <br/>
  <fieldset id="fieldset2" class="coolfieldset">
    <legend>Closed at start</legend>
    <div>
      <p>If we want the fieldset to be closed or collapsed at start, just add <b>{collapsed:true}</b> as the argument.</p>
<pre>
$('#fieldset2').coolfieldset({collapsed:true});
</pre>
    </div>
  </fieldset>
  <br/>
  <fieldset id="fieldset4" class="coolfieldset">
    <legend>Animation Speed</legend>
    <div>
      <p>You can also define the animation speed for the fieldset while collapsing or expanding by using <b>speed</b> option. Acceptable values are "<b>fast</b>", "<b>medium</b>", "<b>slow</b>", or a number in millisecond.</p>
<pre>
$('#fieldset3').coolfieldset({speed:"fast"});
</pre>
    </div>
  </fieldset>
  <br/>
  <fieldset id="fieldset5" class="coolfieldset">
    <legend>No Animation</legend>
    <div>
      <p>If you don't want to use animation effect, please use <b>animation</b> option and fill its value with <b>false</b>.</p>
<pre>
$('#fieldset4').coolfieldset({animation:false});
</pre>
    </div>
  </fieldset>
  <br/><br/>
  <fieldset id="fieldset3" class="coolfieldset">
    <legend>Notes :</legend>
    <div>
      <ul>
        <li>All content inside fieldset (except the <b>legend</b> tag) should be placed inside the <b>div</b> tag.</li>
        <li>Edit the <b>jquery.coolfieldset.css</b> to change the fieldset style.</li>
      </ul>
    </div>
  </fieldset>
  <script>
    $('#fieldset1, #fieldset3').coolfieldset();
    $('#fieldset2').coolfieldset({collapsed:true});
    $('#fieldset4').coolfieldset({speed:"fast"});
    $('#fieldset5').coolfieldset({animation:false});
  </script>
</body>
</html>

完整實例代碼點擊此處本站下載。

更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery切換特效與技巧總結(jié)》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery擴展技巧總結(jié)》、《jQuery常見經(jīng)典特效匯總》、《jQuery動畫與特效用法總結(jié)》、《jquery選擇器用法總結(jié)》及《jQuery常用插件及用法總結(jié)

希望本文所述對大家jQuery程序設(shè)計有所幫助。

相關(guān)文章

最新評論

绥滨县| 茌平县| 锡林浩特市| 平远县| 土默特左旗| 洪洞县| 将乐县| 北安市| 松原市| 伊金霍洛旗| 阜新市| 繁峙县| 礼泉县| 普宁市| 明水县| 林口县| 山东| 安塞县| 红安县| 杨浦区| 朝阳县| 酒泉市| 施秉县| 株洲市| 宁城县| 钟山县| 襄汾县| 尉氏县| 和硕县| 湖口县| 汉中市| 灵石县| 莱西市| 潼南县| 鞍山市| 获嘉县| 合山市| 西藏| 盱眙县| 利川市| 龙川县|