Press "Enter" to skip to content

jQuery Star Rating Plugin | score.js

Score.js is a simple and fully customizable jQuery star rating plugin that uses a Unicode entity or Font Awesome Icon Font for rating icons.

simple jquery star rating, bootstrap star rating input, dynamic star rating jquery, star rating jquery source code, half star rating jquery, star rating js

Features:

  • Generates HTML lists or extension elements for the star rating control form.
  • Any number of star ratings is allowed.
  • Vertical and horizontal layouts.
  • Custom sizes and colors.
  • Callback functions.
  • Easy to use browser.

How to make use of it:

1. Load the jQuery library and jQuery Score.js JS & CSS files into the HTML page.

<link rel="stylesheet" href="css/jQuery.score.css">
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="js/jQuery.score.js"></script>

2. Download Font Awesome if you want to use Font Awesome icons for rating icons.

<link rel="stylesheet" href="font-awesome.min.css">

3. Create a DIV container (or unordered HTML list) to control the star rating.

<div class="demo-default"></div> 
<!-- Or -->
<ul class="demo-default"></ul>

4. Initialize the plugin.

$('.demo-default').score();

5. Default options for the plugin.

$('.demo-default').score({

// score range
number      : 5,

// symbol size
size        : 26,           

// symbole color
color       : 'black', 

// initila score
score       : undefined, 

// vertical layout
vertical    : false,         

// replace default hints
// e.g. ['bad', 'poor', 'regular', 'good', 'gorgeous']
hints       : undefined,  

// executed on click.
click       : undefined, 

// executed on mouseover.
mouseover   : undefined, 

// executed on mouseout.
mouseout    : undefined,  

// read only mode
readOnly    : false,

// uses font awesome icons
fontAwesome : false, 

// debug mode
debug       : false  

});

5. Plugin API.

// set a score
$('.score').score('score', score);

// get a score
$('.score').score('score');

// remove current score
$('.score').score('cancel');

// destroy the plugin
$('.score').score('destroy');

simple customizable jquery rating, score.js Plugin/Github


See Demo And Download

Official Website(haozki): Click Here

This superior jQuery/javascript plugin is developed by haozki. For extra advanced usage, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.