# jq-classrotation

> Allows cycling through a list of user-defined classes

Latest version **1.0.0** (published 2016-01-20) · 0 weekly downloads

## Install

```sh
npm install jq-classrotation
pnpm add jq-classrotation
yarn add jq-classrotation
bun add jq-classrotation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-20 |
| First published | 2016-01-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jack Philippi |
| Maintainers | Jack Philippi |
| Keywords | class, rotate, jquery-plugin, ecosystem:jquery |

## Links

- npm: https://www.npmjs.com/package/jq-classrotation
- Repository: https://github.com/jackphilippi/jq-classrotation
- Issues: https://github.com/jackphilippi/jq-classrotation/issues
- npm.io page: https://npm.io/package/jq-classrotation

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) >=1.5

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-20

## README

# jq-classrotation

The classrotation jQuery plugin allows the rotation of specific user-defined classes in a html page. In order to use this plugin, you will need to set up your classes in a css stylesheet. The plugin parses an array of user-specified classes and swaps all occurences of the 'current' class with the next in the array.

##### Usage #####
#
1. Clone the plugin into your project's global namespace
2. Create a few classes
3. Create an element in your DOM with one of your classes
3. Create a jquery event i.e. `$('#clickme').click(function(){...});`
4. Inside the event, instantiate an array of your classes i.e.`var array = ["blue", "green", "yellow"];` and then call the `$().rotate(array);` function (taking your array as a parameter).
5. Trigger your event

##### Example #####
#
An extremely basic implementation looks something like this:
https://jsfiddle.net/jackphilippi/0x39Lmex/

---
_Source: https://npm.io/package/jq-classrotation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
