Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chesleybrown/randomclass-directive
Very simple directive for randomizing a class on an element.
https://github.com/chesleybrown/randomclass-directive
Last synced: 15 days ago
JSON representation
Very simple directive for randomizing a class on an element.
- Host: GitHub
- URL: https://github.com/chesleybrown/randomclass-directive
- Owner: chesleybrown
- License: mit
- Created: 2014-02-13T13:38:31.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-13T13:56:25.000Z (almost 11 years ago)
- Last Synced: 2024-10-10T17:44:18.359Z (about 1 month ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
randomclass-directive
=====================Very simple directive for randomizing a class on an element.
#### Install with Bower:
```
bower install randomclass-directive
```#### Include the directive in your Angular module:
```
var myApp = angular.module('myApp', ['randomclass-directive']);
```## Usage
Use the `random-class` directive on the element you want to apply a random class to. Also set the `classPrefix` as the prefix of your class. A random number will be appended to the class based on a range from the `min` and `max` you set.
```html
```