-
Notifications
You must be signed in to change notification settings - Fork 0
Spoiler
- Spoiler
-
this class will create spoiler.
-
getStatus(index) ⇒
String|Array -
returning status of spoiler (opened, closed)
- toggle(index)
-
toggle spoiler element
this class will create spoiler.
Kind: global class
Version: 2.0.1
Author: Ivan Kaduk
Copyright: Ivan Kaduk 2016.
| Param | Type | Description |
|---|---|---|
| className | String |
class of div wich containe spoiler child elements. |
| status | String |
start status of spoiler, it can be 'opened' or 'closed'. |
| velocity | int |
velocite of slide in px per second |
| title | String |
class of spoiler button |
| content | String |
class of spoiler content div |
Example
var spoiler = new Spoiler('spoiler','opened', 1);Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Default: title
Privat:
Kind: inner property of Spoiler
Default: content
Privat:
Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Privat:
Kind: inner property of Spoiler
Privat:
Kind: global variable
Default: 10
Access: public
Kind: global variable
Access: public
Kind: global variable
Access: public
returning status of spoiler (opened, closed)
Kind: global function
Returns: String - - status of current spoilerArray - - statuses of all spoilers with current className
Access: public
| Param | Type | Description |
|---|---|---|
| index | int |
it is index of spoiler element with current className |
Example
spoiler.getStatus(0);toggle spoiler element
Kind: global function
Access: public
| Param | Type | Description |
|---|---|---|
| index | int |
it is index of spoiler element with current className |
Example
spoiler.toggle();