How to use
- Include the necessary JS and CSS files.
<script type="text/javascript" src="rating.js"></script>
<link rel="stylesheet" type="text/css" href="rating.css" />
- Create a text box element (the class "
rating10
" contains a num "10", this will display 10 starts).
<input type="text" class="rating rating10" />
- Fire plug-in using jQuery selector.
$(function ()
{
$('.rating').rating();
});
- When form submits, you can access these values in the server-side script
using
$_POST
(PHP), Request.Form
(ASP or ASP.NET).