<h1>Ratyli Demo</h1>

    <div id="demo1" class="demo">
        <span class="ratyli"></span>

    <div id="demo2" class="demo">
        <h2>Configure with Datasets</h2>
        <span class="ratyli" data-rate="2" data-ratemax="3"></span>

    <div id="demo3" class="demo">
        <h2>Configure with JS</h2>
        <span class="ratyli"></span>

    <div id="demo4" class="demo">
        <h2>Custom Signs</h2>
        <span class="ratyli" data-full="X" data-empty="O"></span>

    <div id="demo5" class="demo">
        <h2>Font Awesome Signs</h2>
        <span class="ratyli"></span>

    <div id="demo6" class="demo">
        <h2>Rated Callback</h2>
        <span class="ratyli"></span>

    <div id="demo7" class="demo">
        <h2>Sign Callbacks</h2>
        <span class="ratyli"></span>

    <div id="demo8" class="demo">
        <h2>Custom cursor</h2>
        <span class="ratyli"></span>

    <div id="demo9" class="demo">
        <span class="ratyli" data-rate="3"></span>

    <div id="demo10" class="demo">
        <span class="ratyli" data-rate="1"></span>

        <p>Fork Ratyli on Github: <a href="https://github.com/peet86/Ratyli">peet86/ratyli</a></p>
/* No CSS needed, but you can pimp the container and the signs as you wish. */

/* all sign style */
.ratyli .rate{color: #ccc; font-size: 24px;}

/* empty sign style */
.ratyli .rate-empty{color: #666;}

/* full sign style after rating*/
.ratyli.rated .rate-full{color: #fe5845;}

/* active signs (hover)*/
.ratyli .rate-active{color: #a94039;}

/* layout styles (only for demo)*/
body{font-family: sans-serif; background:#222; }
h1{color:#00dd9a; text-align:center; font-size:24px;  margin:30px 0;}
h2{color:#fe5845; font-weight:300; font-size:16px; margin:15px 0;}
p{clear:both; color: #ccc; text-align:center; padding:50px 0;}
footer p{font-size: 80%}
.demo{float:left; width:18%; padding:30px 1%; text-align:center;}
@media screen and (max-width: 920px) {
	.demo{float:none; width:90%; padding:20px 5%;}

/* GitHub: https://github.com/peet86/Ratyli */

$(function() {
	// Default
	$("#demo1 .ratyli").ratyli();

	// Configure with Datasets
	$("#demo2 .ratyli").ratyli();

	// Configure with JS
	$("#demo3 .ratyli").ratyli({rate:3,max:7});

	// Custom Signs
	$("#demo4 .ratyli").ratyli();

	// Font Awesome Signs
	$("#demo5 .ratyli").ratyli({
		full:"<i class='fa fa-thumbs-up'></i>",
		empty:"<i class='fa fa-thumbs-o-up'></i>",


	// Rated Callback
	$("#demo6 .ratyli").ratyli({
			// rating callback
			if(!init) alert(value);  // prevent run at init

	// Sign Callbacks:
	$("#demo7 .ratyli").ratyli({
			// sign click event callback
			alert("clicked: "+value);
			// sign mouseenter event callback
			console.log("enter : "+value);
			// sign mouseleave event callback
			console.log("leave : "+target);

	// Custom cursor
	$("#demo8 .ratyli").ratyli({cursor:"crosshair"});

	// Disabled
	$("#demo9 .ratyli").ratyli({disable:true});

	// Unrateable
	$("#demo10 .ratyli").ratyli({unrateable:true});

Run Pen

External CSS

  1. //maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  2. https://raw.githack.com/peet86/Ratyli/master/jquery.ratyli.min.js