Minimal Rating Input Plugin For jQuery - rating.js

File Size: 3.32 KB
Views Total: 2478
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Minimal Rating Input Plugin For jQuery - rating.js

A minimalist jQuery 5-star rating plugin which uses Font Awesome iconic font and any text input field. You can use this plugin for any purpose, commercial or private, without any further permission from the author.

How to use it:

1. Load the required Font Awesome for the rating symbols.

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

2. Create a text box and specify the initial rating value in the value attribute:

<input type="text" value="3" id="ratingme" name="ratingme"/>

3. Download and load the JavaScript file rating.js after jQuery library.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="rating.js"></script>

4. Calling the plugin will transform the input field into a basic star rating system.

$('#ratingme').rating();

5. If you want to get the currently selected rating value.

$('#ratingme').val()

This awesome jQuery plugin is developed by themaheshe. For more Advanced Usages, please check the demo page or visit the official website.