0.8.10 • Published 2 years ago

@pluginjs/classes v0.8.10

Weekly downloads
16
License
GPL-3.0
Repository
github
Last release
2 years ago

Classes

npm package

classes is a utility JavaScript library for control class interfaces.

Introduction

Installation

Yarn

yarn add @pluginjs/classes

NPM

npm i @pluginjs/classes

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/classes/dist/classes.js"></script>

Production:

<script src="https://unpkg.com/@pluginjs/classes/dist/classes.min.js"></script>

API

addClass

Add specified class values. If these classes already exist in attribute of the element, then they are ignored.

Parameters

| Name | Type | Description | |||-| | className | String[] | function rest parameter |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

removeClass

Remove specified class values.

Parameters

| Name | Type | Description | |||-| | className | String[] | function rest parameter |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

indexOfClass

Return class value by index in collection.

Parameters

| Name | Type | Description | |||-| | className | String | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | index | Number | index of class |

hasClass

Checks if specified class value exists in class attribute of the element.

Parameters

| Name | Type | Description | |||-| | className | String | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | hasClass | Boolean | |

toggleClass

Toggle class value; i.e., if class exists then remove it and return false, if not, then add it and return true.

Parameters

| Name | Type | Description | |||-| | className | String | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

Browser support

Tested on all major browsers.

IE / EdgeFirefoxChromeSafariOpera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/classes is Licensed under the GPL-v3 license.

If you want to use @pluginjs/classes project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright

Copyright (C) 2022 Creation Studio Limited.

@infinitebrahmanuniverse/nolb-_plu@everything-registry/sub-chunk-727@pluginjs/animate-text@pluginjs/arrows@pluginjs/audio-picker@pluginjs/auto-complete@pluginjs/before-after@pluginjs/bg-picker@pluginjs/bg-video@pluginjs/breadcrumb@pluginjs/cascader@pluginjs/checkbox@pluginjs/choice@pluginjs/collapse@pluginjs/color-picker@pluginjs/color-selector@pluginjs/countdown@pluginjs/gmap@pluginjs/gradient-picker@pluginjs/gradient-selector@pluginjs/grids@pluginjs/headroom@pluginjs/hotspots@pluginjs/icon-picker@pluginjs/image-picker@pluginjs/image-selector@pluginjs/infinite@pluginjs/input-mask@pluginjs/item-list@pluginjs/date-picker@pluginjs/dots@pluginjs/draggable@pluginjs/dropdown@pluginjs/filters@pluginjs/floating-menu@pluginjs/font-editor@pluginjs/font-picker@pluginjs/gallery@pluginjs/gallery-picker@pluginjs/accordion@pluginjs/swipeable@pluginjs/table-sort@pluginjs/tabs@pluginjs/thumbnails@pluginjs/time-picker@pluginjs/timeline@pluginjs/toast@pluginjs/toggle@pluginjs/toggle-list@pluginjs/tooltip@pluginjs/tree@pluginjs/units@pluginjs/units-range@pluginjs/video@pluginjs/video-picker@pluginjs/wizard@pluginjs/multi-select@pluginjs/nav-to-select@pluginjs/notice@pluginjs/offset@pluginjs/paginator@pluginjs/parallax@pluginjs/pattern-picker@pluginjs/pluginjs@pluginjs/pop-dialog@pluginjs/popover@pluginjs/progress@pluginjs/radio@pluginjs/range@pluginjs/rate@pluginjs/reveal@pluginjs/scroll-progress@pluginjs/scroll-spy@pluginjs/scroll-to@pluginjs/scroll-top@pluginjs/scrollable@pluginjs/scrollbar@pluginjs/section-scroll@pluginjs/select@pluginjs/shares@pluginjs/shorten@pluginjs/slider@pluginjs/spinner@pluginjs/sticky@pluginjs/strength@pluginjs/svg-picker@pluginjs/svg-progress@pluginjs/swipe@pluginjs/lazyload@pluginjs/lightbox@pluginjs/link-picker@pluginjs/list@pluginjs/loader@pluginjs/magnify@pluginjs/map-picker@pluginjs/masonry@pluginjs/modal@pluginjs/zoom@zalastax/nolb-_plu
0.8.10

2 years ago

0.8.9

3 years ago

0.8.8

3 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.7.20

5 years ago

0.7.19

5 years ago

0.7.18

5 years ago

0.7.17

5 years ago

0.7.16

5 years ago

0.7.15

5 years ago

0.7.14

5 years ago

0.7.13

6 years ago

0.7.12

6 years ago

0.7.11

6 years ago

0.7.10

6 years ago

0.7.9

6 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago