国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

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

2019-11-20 10:11:42
字體:
來源:轉載
供稿:網友

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

<!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>

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

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

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 潍坊市| 内江市| 元阳县| 商城县| 阿图什市| 疏勒县| 平远县| 宁夏| 大石桥市| 陆良县| 香格里拉县| 都江堰市| 满城县| 伊宁市| 永宁县| 兴隆县| 隆回县| 瑞昌市| 五常市| 新源县| 繁昌县| 青铜峡市| 饶平县| 乌拉特前旗| 海兴县| 黎城县| 海林市| 介休市| 佛学| 五寨县| 阳原县| 华蓥市| 上林县| 日土县| 河南省| 汾阳市| 黄龙县| 甘洛县| 芒康县| 县级市| 乐都县|