zebra_accordion
Advanced tools
Comparing version 1.2.8 to 1.2.9
/** | ||
* Zebra_Accordion | ||
* | ||
* A tiny (3KB minified, ~1.3KB gzipped) accordion plugin for jQuery. | ||
* A tiny (3KB minified, ~1.3KB gzipped) jQuery accordion plugin | ||
* | ||
@@ -19,3 +19,3 @@ * It transforms a basic definition list, without requiring any other specific markup, into a small-footprint, easily | ||
* - callback functions can be used for further customization; | ||
* - works in all major browsers (Firefox, Opera, Safari, Chrome, Internet Explorer 6+) | ||
* - works in pretty much any browser - Firefox, Chrome, Safari, Edge, Opera and Internet Explorer 6+ | ||
* | ||
@@ -25,4 +25,4 @@ * Read more {@link https://github.com/stefangabos/Zebra_Accordion/ here} | ||
* @author Stefan Gabos <contact@stefangabos.ro> | ||
* @version 1.2.8 (last revision: October 13, 2017) | ||
* @copyright (c) 2011 - 2017 Stefan Gabos | ||
* @version 1.2.9 (last revision: July 13, 2018) | ||
* @copyright (c) 2011 - 2018 Stefan Gabos | ||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE | ||
@@ -29,0 +29,0 @@ * @package Zebra_Accordion |
@@ -9,2 +9,4 @@ $(document).ready(function() { | ||
new $.Zebra_Accordion('#Zebra_Accordion3'); | ||
}); |
@@ -15,3 +15,3 @@ { | ||
"license": "LGPL-3.0", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"keywords": [ | ||
@@ -18,0 +18,0 @@ "jquery-plugin", |
<img src="https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png" alt="zebrajs" align="right"> | ||
# Zebra_Accordion | ||
# Zebra Accordion [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Zebra_Accordion%20-%20A%20tiny,%20easily%20configurable,%20fully%20customizable,%20cross-browser%20jQuery%20accordion%20plugin&url=https://github.com/stefangabos/Zebra_Accordion&via=stefangabos&hashtags=accordion,collapsible,jquery) | ||
*A tiny (3 KB minified, 1.3KB gzipped), easily configurable, fully customizable, cross-browser accordion jQuery plugin* | ||
*A tiny (3 KB minified, 1.3KB gzipped), easily configurable, fully customizable, cross-browser jQuery accordion plugin* | ||
[![npm](https://img.shields.io/npm/v/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![Total](https://img.shields.io/npm/dt/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![Monthly](https://img.shields.io/npm/dm/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![License](https://img.shields.io/npm/l/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) | ||
[![npm](https://img.shields.io/npm/v/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![Total](https://img.shields.io/npm/dt/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![Monthly](https://img.shields.io/npm/dm/zebra_accordion.svg)](https://www.npmjs.com/package/zebra_accordion) [![](https://data.jsdelivr.com/v1/package/npm/zebra_accordion/badge?style=rounded)](https://www.jsdelivr.com/package/npm/zebra_accordion) [![License](https://img.shields.io/npm/l/zebra_accordion.svg)](https://github.com/stefangabos/Zebra_Accordion/blob/master/LICENSE.md) | ||
Zebra_Accordion is a tiny (3KB minified, ~1.3KB gzipped) accordion plugin for jQuery. It transforms a basic definition list, | ||
Zebra Accordion is a tiny (3KB minified, ~1.3KB gzipped) jQuery accordion plugin. It transforms a basic definition list, | ||
without requiring any specific markup, into a small-footprint, easily configurable, fully customizable, cross-browser accordion widget, useful for better organizing larger groups of content. | ||
## Support the development of this project | ||
[![Donate](https://img.shields.io/badge/Be%20kind%20%7C%20Donate%20$3%20with%20-%20PayPal%20-brightgreen.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NBM9XKB7XAB5L) | ||
## Features | ||
@@ -25,21 +21,27 @@ | ||
- callback functions can be used for further customizations | ||
- works in all major browsers (Firefox, Opera, Safari, Chrome, Internet Explorer 6+) | ||
- works in pretty much any browser - Firefox, Chrome, Safari, Edge, Opera and Internet Explorer 6+ | ||
## Demo | ||
See the [demos](https://stefangabos.github.io/Zebra_Accordion/) | ||
## Requirements | ||
Zebra_Accordion has no dependencies other than jQuery 1.7.0+ | ||
Zebra Accordion has no dependencies other than jQuery 1.7.0+ | ||
## Installation | ||
Zebra_Accordion is available as a [npm package](https://www.npmjs.com/package/zebra_accordion). To install it use: | ||
Zebra Accordion is available as a [npm package](https://www.npmjs.com/package/zebra_accordion). To install it use: | ||
```bash | ||
# the "--save" argument adds the plugin as a dependency in packages.json | ||
npm install zebra_accordion --save | ||
``` | ||
npm install zebra_accordion | ||
``` | ||
Zebra_Accordion is also available as a [Bower package](http://bower.io/). To install it use: | ||
Zebra Accordion is also available as a [Bower package](http://bower.io/). To install it use: | ||
```bash | ||
# the "--save" argument adds the plugin as a dependency in bower.json | ||
bower install zebra_accordion --save | ||
``` | ||
bower install zebra_accordion | ||
``` | ||
@@ -51,7 +53,7 @@ ## How to use | ||
```html | ||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | ||
<script>window.jQuery || document.write('<script src="path/to/jquery-3.2.1.js"><\/script>')</script> | ||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | ||
<script>window.jQuery || document.write('<script src="path/to/jquery-3.3.1.js"><\/script>')</script> | ||
``` | ||
Load the Zebra_Accordion jQuery plugin: | ||
Load the Zebra Accordion jQuery plugin: | ||
@@ -62,9 +64,12 @@ ```html | ||
Alternatively, you can load Zebra_Accordion from [JSDelivr CDN](https://www.jsdelivr.com/) like this: | ||
Alternatively, you can load Zebra Accordion from [JSDelivr CDN](https://www.jsdelivr.com/package/npm/zebra_accordion) like this: | ||
```html | ||
<!-- for the most recent version --> | ||
<script src="https://cdn.jsdelivr.net/gh/stefangabos/Zebra_Accordion/dist/zebra_accordion.min.js"></script> | ||
<!-- for the most recent version, not recommended in production --> | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/zebra_accordion@latest/dist/zebra_accordion.min.js"></script> | ||
<!-- for a specific version --> | ||
<script src="https://cdn.jsdelivr.net/gh/stefangabos/Zebra_Accordion@1.2.5/dist/zebra_accordion.min.js"></script> | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/zebra_accordion@1.2.8/dist/zebra_accordion.min.js"></script> | ||
@@ -80,10 +85,14 @@ <!-- replacing "min" with "src" will serve you the non-compressed version --> | ||
...or from [JSDelivr CDN](https://www.jsdelivr.com/) | ||
...or from [JSDelivr CDN](https://www.jsdelivr.com/package/npm/zebra_accordion) | ||
```html | ||
<!-- for the most recent version --> | ||
<link rel="stylesheet" href=="https://cdn.jsdelivr.net/gh/stefangabos/Zebra_Accordion/dist/zebra_accordion.min.css"> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/zebra_accordion@latest/dist/zebra_accordion.min.css"> | ||
<!-- for a specific version --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/stefangabos/Zebra_Accordion@1.2.5/dist/zebra_accordion.min.css"> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/zebra_accordion@1.2.8/dist/zebra_accordion.min.css"> | ||
@@ -95,3 +104,3 @@ <!-- replacing "min" with "src" will serve you the non-compressed version --> | ||
> Don't forget to add the `Zebra_Accordion` class to the list container! If you haven't had a look, all it does is to set `display:hidden` the all the tabs and add `cursor:pointer` to titles, so it will not add too much to your CSS. | ||
> Don't forget to add the `Zebra Accordion` class to the list container! If you'll [have a look](https://github.com/stefangabos/Zebra_Accordion/blob/master/dist/zebra_accordion.css) you will see that all it does is to set `display:hidden` the all the tabs and add `cursor:pointer` to titles, so it will not add overweight to your CSS and that you will have to style the accordion to suit your needs. | ||
@@ -131,5 +140,8 @@ ```html | ||
$(document).ready(function() { | ||
new $.Zebra_Accordion($('.Zebra_Accordion')); | ||
}); | ||
``` | ||
## Configuration options | ||
@@ -160,3 +172,5 @@ | ||
<td valign="top"> | ||
- when set to <code>TRUE</code> it indicates that all tabs can be collapsed<br>- if set to <code>FALSE</code>, an expanded tab can be collapsed only by expanding another tab<br>- if set to <code>0</code>, the behavior is the same when set to <code>FALSE</code> with the difference that an open tab can also be closed. | ||
- when set to <code>TRUE</code> it indicates that all tabs can be collapsed<br> | ||
- if set to <code>FALSE</code>, an expanded tab can be collapsed only by expanding another tab<br> | ||
- if set to <code>0</code>, the behavior is the same when set to <code>FALSE</code> with the difference that an open tab can also be closed. | ||
</td> | ||
@@ -186,3 +200,3 @@ </tr> | ||
<td valign="top"> | ||
If an tab's content is not entirely visible once it is expanded, the browser window will be scrolled so that the entire content is visible (if is possible).<br> | ||
If an tab's content is not entirely visible once it is expanded, the browser window will be scrolled so that the entire content is visible (if it is possible).<br> | ||
This value represents the speed (in milliseconds) used for scrolling browser window to the right position. | ||
@@ -206,3 +220,3 @@ </td> | ||
The value of this property can also be boolean <code>FALSE</code>, indicating that all tabs should be collapsed by default.<br> | ||
If the value of the <strong>collapsible</strong> property is <code>TRUE</code>, the value of this property can also be boolean <code>TRUE</code>, indicating that all tabs should be expanded by default. In this case, you can also provide <em>an array</em> of indexes to be expanded by default. | ||
If the value of the <code>collapsible</code> property is <code>TRUE</code>, the value of this property can also be boolean <code>TRUE</code>, indicating that all tabs should be expanded by default. In this case, you can also provide <code>an array</code> of indexes to be expanded by default. | ||
</td> | ||
@@ -216,3 +230,3 @@ </tr> | ||
Set this to <code>TRUE</code> if tabs should be expanded when hovering the mouse over their associated <em>titles</em>.<br><br> | ||
<blockquote>If the <strong>collapsible</strong> property is <code>TRUE</code>, this property will always be considered as <code>FALSE</code>!</blockquote> | ||
<blockquote>If the <code>collapsible</code> property is <code>TRUE</code>, this property will always be considered as <code>FALSE</code>!</blockquote> | ||
</td> | ||
@@ -294,7 +308,7 @@ </tr> | ||
`noFx` - *(optional)* - if set to TRUE, the tab will be instantly expanded without animation. | ||
`noFx` - *(optional)* - if set to <code>TRUE</code>, the tab will be instantly expanded without animation. | ||
Default is FALSE. | ||
`noScroll` - *(optional)* - if set to TRUE, the browser window will not be scrolled to the newly expanded tab. | ||
`noScroll` - *(optional)* - if set to <code>TRUE</code>, the browser window will not be scrolled to the newly expanded tab. | ||
@@ -318,3 +332,3 @@ Default is FALSE. | ||
`noFx` - *(optional)* - if set to TRUE, the tab will be instantly collapsed without animation. | ||
`noFx` - *(optional)* - if set to <code>TRUE</code>, the tab will be instantly collapsed without animation. | ||
@@ -330,4 +344,10 @@ Default is FALSE. | ||
## Demo | ||
## Support the development of this project | ||
See the [demos](http://stefangabos.github.io/Zebra_Accordion/) | ||
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NBM9XKB7XAB5L) | ||
## Sponsors | ||
Cross browser/device testing is done with | ||
[![BrowserStack](https://github.com/stefangabos/Zebra_Dialog/raw/master/examples/browserstack.png)](https://www.browserstack.com/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
76618
13
492
341