jQuery – Collapser plugin
Jquery collapser is a multi purpose collapser plugin made for expanding and collapsing elements. Can create a accordion, list collapser using this plugin
- Features
- Demo
- Documentation
- Download
Features
- Very light-weight plugin, fast and simple.
- Can collapse any element within an document.
- Can add seperate classes for expanding and collapsing.
- Customized targeting elements.
- Callback functions.
- Predetection of collapsed elements.
- Can create accordion, list collapsers etc by adding a single additional line.
- Cross browser supported.
Documentation
Basic Usage
$('Element selector').collapser({
target: 'next',
targetOnly: null,
effect: 'slide',
changeText: true,
expandHtml: 'Expand',
collapseHtml: 'Collapse',
expandClass: '',
collapseClass:''
}, before_collapse_callback_function , after_collapse_callback_function);
Plugin properties
Jquery collapser consist of 8 properties for customizing the collapser.
- target:
- This property allows to target the collapsing element. Values accepted are:
- next – Collapses the next element.
- prev – Collapses the previous element.
- siblings – Collapses all siblings.
- Any element selector.
- targetOnly:
- This property is effective only when the target is set to
nextandprevelements. Accepted value is any element selector. This collapses next, prev elements only of the specified selector. - effect:
- The effect of collapsing. Values accepted are:
- slide – For sliding effect.
- fade – For fade effect.
- changeText:
- Allows to change the collapsing the text. Values are true (to change text) and false (to not to change the text)
- expandHtml:, collapseHtml:
- Expand and collapse Html for the collapser
- expandClass:, collapseClass:
- Expand and collapse class for the collapser
Callback functions
More features can be added to collapser by using the callback functions. These can be named functions or anonymous functions
- Example – Anonymous functions
-
$('Element selector').collapser({ target: 'next', targetOnly: null, effect: 'slide', changeText: true, expandHtml: 'Expand', collapseHtml: 'Collapse', expandClass: '', collapseClass:'' }, function(){ alert('Before collapse'); } , function(){ alert(''After collapse'); }); - Example – Named functions
-
$('Element selector').collapser({ target: 'next', targetOnly: null, effect: 'slide', changeText: true, expandHtml: 'Expand', collapseHtml: 'Collapse', expandClass: '', collapseClass:'' }, beforeCallback, afterCallback); function beforeCallback(){ alert('Before callback'); } function afterCallback(){ alert('After callback'); }
Pingback: 14 Outstanding jQuery Plugins & Tutorials « The Creative Project
Pingback: 50 Useful jQuery Plugins to Enhance your Forms - Noupe Design Blog
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | my computer geek
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | excreters.com
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | Neil Kearney Design
Pingback: 50 Useful jQuery Plugins to Enhance your Forms « qeqnes | Designing. jQuery, Ajax, PHP, MySQL and Templates
Pingback: [HTML5] 50个有用的jQuery插件 « Cookfl
Pingback: Content meets Interface « Family Map
Pingback: Coming Together « Family Map
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | Solar Hunter
Pingback: 50 tane kullanışlı jQuery eklentisi | Yaşarcan Kasal
Pingback: 10 jQuery Scripts To Optimize Forms | Devlounge
Pingback: 200 AJAX & JavaScript Techniques
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | Woupe Design Blog
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | Timesneed.com
Pingback: 50 Useful jQuery Plugins to Enhance your Forms | qeqnes | Designing. jQuery, Ajax, PHP, MySQL and Templates
Pingback: 20 jQuery Table Plugins
Pingback: 20 jQuery Table Plugins - Welege
Pingback: 10 jQuery Scripts To Optimize Forms | Add Colours
Pingback: 20个非常有用的jQuery表格插件 | 贝塔熊 | betabears
Pingback: Aakasha web | Farestrans
Pingback: FreeDownloadSecrets.com » Extensive Collection Of Useful jQuery Plugins For Working With Tables
Pingback: 28 Useful jQuery Plugins for Working with Tables | 1step web design: Best for developer and designer
Pingback: 10 jQuery Tabs and Accordion | jQuery4u
Pingback: 10 jQuery Tabs and Accordion | jQuery4u
Pingback: 10个jQuery的标签页tabs和手风琴效果Accordion实现 » 全信息
Pingback: 柯激情的个人主页 » 分享10个jQuery的标签页tabs和手风琴效果Accordion实现
Pingback: Share 10 jQuery tab tabs and accordion effect Accordion implementation - Open News
Pingback: 分享10个jQuery的标签页tabs和手风琴效果Accordion实现 ‹ 站长巴士
Pingback: Questions About Jquery Ajax – Top Apprentice Blog
Pingback: 80 Powerful (Free) jQuery Plugins to Enrich Your Sites User Experience | Tools | instantShift
Pingback: 80 Useful jQuery Plugins to Enrich Your Sites User Experience « Blog de xkortazar
Pingback: 80 Useful (Free) jQuery Plugins to Enrich Your Site’s User Experience | Wordpress Themes
Pingback: 80 Useful (Free) jQuery Plugins to Enrich Your Site’s User Experience | Really Simple Websites
Pingback: 80 Useful (Free) jQuery Plugins to Enrich Your Site’s User Experience | The Art Times
Pingback: 45 پلاگین جی کوئری مفید و رایگان برای سایت شما | Pixran
Pingback: 50 Best Jquery Tutorials & Examples for Web designers
Pingback: 15 Plugins jQuery para crear tablas increíbles
Pingback: 80 Useful (Free) jQuery Plugins to Enrich Your Site’s User Experience | (Web)Design inspiration
Pingback: 50+ Useful Free jQuery Plugins to Enrich Your Site’s User Experience « Freebies « Creative Cartels A Creative Design & Branding Studio
Pingback: 20 jQuery Table Plugins | JqueryHeaven
Pingback: 80 Plugins úteis jQuery para enriquecer a experiência do usuário do seu site – Site para Empresas – Blog sobre Internet e Criação de Site