Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
wbotelhos committed Apr 27, 2024
1 parent 57ee4ee commit 5584bd9
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ It's **Rating**: https://github.com/wbotelhos/rating :star:
```

```js
new Raty(document.querySelector('[data-raty]'));
const raty = new Raty(document.querySelector('[data-raty]'));

raty.init();
```

## Usage with Font
Expand Down Expand Up @@ -90,7 +92,7 @@ new Raty(document.querySelector('[data-raty]'), { starType: 'i' });

## Functions

To call some function, first save the Raty instance on a variable and then call the functions:
To call some function, first, save the Raty instance on a variable and then call the functions:

```js
var raty = new Raty(document.querySelector('[data-raty]'));
Expand All @@ -104,3 +106,15 @@ var raty = new Raty(document.querySelector('[data-raty]'));
|`raty.readOnly(boolean)`|Change the read-only state. |
|`raty.cancel(boolean)` |Cancel the rating. The last param force the click callback.|
|`raty.move(number)` |Move the mouse to the given score point position. |

## Build

```sh
gulp 'amd'
gulp 'umd'
gulp 'commonjs'
gulp 'systemjs'
gulp 'es6'
gulp 'es5'
gulp 'es5-test'
```

0 comments on commit 5584bd9

Please sign in to comment.