https://github.com/thomasdev-de/star-rating
jQuery star rating
https://github.com/thomasdev-de/star-rating
Last synced: 10 months ago
JSON representation
jQuery star rating
- Host: GitHub
- URL: https://github.com/thomasdev-de/star-rating
- Owner: ThomasDev-de
- License: mit
- Created: 2022-01-20T13:26:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T22:37:17.000Z (over 3 years ago)
- Last Synced: 2025-03-15T07:27:01.447Z (over 1 year ago)
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jQuery star-rating plugin

## OPTIONS
```js
let DEFAULTS = {
wrapperClasses: 'p-5 shadow',
starIconEmpty: 'fa fa-star-o',
starIconFull:'fa fa-star',
starColorEmpty: 'lightgray',
starColorFull:'#FFC107',
starsSize: 4, // em
stars: 5,
showInfo:true,
titles: ["Sehr schlecht", "Schlecht", "Mittel", "Gut", "Sehr gut!"],
inputName: 'rating'
};
```
## EVENTS
```js
// trigger when star is clicked
$('.rating').on('change', function (e, stars, index) {
});
```
## EXAMPLE
```html
```
```javascript
$('.rating').starRating();
$(document).on('change', '.rating', function (e, stars, index) {
alert(`Thx for ${stars} stars!`);
});
```