Javascript rating plugin

Quick reference

Considering the example below:

<html>
<script src="https://bossanova.uk/jsuites/v3/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v3/jsuites.css" type="text/css" />

<div id='rating'></div>

<script>
var myRating = jSuites.rating(document.getElementById('rating'), {
    value: 3,
    tooltip: [ 'Very bad', 'Bad', 'Average', 'Good', 'Very good' ],
});
</script>
</html>


Available Methods

Method Description
myRating.getValue();Get the current value
myRating.setValue(number)Set a new value
@param int newValue - Set a new value


Initialization properties

Property Description
number: numberHow many stars to be rendered. Default: 5
value: numberInitial value. Default: null
tooltip: arrayLegend for the stars. Default: [ 'Very bad', 'Bad', 'Average', 'Good', 'Very good' ]


Available Events

Method Description
onchangeTrigger a method when value is changed.
(element: DOMElement, value: number) => void