微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jQuery内容折叠效果插件用法实例分析(附demo源码)

本文实例讲述了jQuery内容折叠效果插件用法分享给大家供大家参考,具体如下:

rush:js;"> jQuery Collapsible Fieldset

jQuery Collapsible Fieldset


Default

By default the fieldset is opened or expanded at start. Click on its legend to close or collapse it.

The code is simply like below

$('#fieldset1').coolfieldset();

Closed at start

If we want the fieldset to be closed or collapsed at start,just add {collapsed:true} as the argument.

$('#fieldset2').coolfieldset({collapsed:true});

Animation Speed

You can also define the animation speed for the fieldset while collapsing or expanding by using speed option. Acceptable values are "fast","medium","slow",or a number in millisecond.

$('#fieldset3').coolfieldset({speed:"fast"});

No Animation

If you don't want to use animation effect,please use animation option and fill its value with false.

$('#fieldset4').coolfieldset({animation:false});


Notes :
  • All content inside fieldset (except the legend tag) should be placed inside the div tag.
  • Edit the jquery.coolfieldset.css to change the fieldset style.

完整实例代码点击此处

更多关于jQuery相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》及《

希望本文所述对大家jQuery程序设计有所帮助。

原文地址:https://www.jb51.cc/jquery/49102.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐