🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Stars.js is a jQuery plugin for generating a star rating system that allows any icon fonts, variable star sizes, colors and init values.

Rating star-rating

Documentation

jquery-stars - A rating star plugin using icon fonts

Put the rating star in your app without any complications :-) Want demo? See here

Dependencies

  • jQuery
  • Any icon font

Usage

You can use any icon font, just import the font and jquery. By default the icons uses Font Awesome classes, to change see Options section.

<script src="stars.js"></script> <div></div>
$('div').stars();  // 3 Stars with tootltip and callback $('div').stars({   stars: 3,   text: ['Good', 'Great', 'Excellent'],   click: function(index) {     // Some ajax action   } });

Options

stars      : 5                // How many stars are displayed. Default is 5 emptyIcon  : 'fa-star-o'      // Font icon class for empty stars filledIcon : 'fa-star'        // Font icon class when hovering or selected starClass  : ''               // Common class for stars color      : '#E4AD22'        // Font color, if 'none' doesn't apply any color value      : 0                // Default value to initialize filled stars text       : []               // Array of strings, tooltips for each star click      : function(index)  // Callback

Licence

The MIT License


You May Also Like