Javascript Rating

Basic javascript vanilla example with events


Value: 3

Source code example

<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> <div id='console'></div>

<script>
jSuites.rating(document.getElementById('rating'), {
    value: 3,
    onchange: function(el, val) {
        document.getElementById('console').innerHTML = val + ' star selected';
    },
    tooltip: [ 'Very bad', 'Bad', 'Average', 'Good', 'Very good' ],
});
</script>
</html>