This is a simple JavaScript plugin powered by Typescript. This plugin allows you to create custom rating using any font from Font-Awesome or Glyphicon.
You can customize the style of the rating and customize the way to work with it !
bower install askmethat-rating
var options = {
backgroundColor : "#e5e500",
hoverColor: "#ffff66",
fontClass: "fa fa-star",
minRating: 1,
maxRating: 5,
readonly: false,
step: Askmethat.AskmethatRatingSteps["OnePerOneStep"],
inputName: "AskmethatRating"
};
var div = document.getElementById("myRating");
var amcRating = new Askmethat.AskmethatRating(div, 2, options);
The popover will display some progress bar that represente the percentage of selected rating value
var options = {
backgroundColor : "#e5e500",
hoverColor: "#ffff66",
fontClass: "fa fa-star",
minRating: 1,
maxRating: 5,
readonly: false,
step: Askmethat.AskmethatRatingSteps["OnePerOneStep"],
inputName: "AskmethatRatingPopover",
popover: {
color: "#e5e500",
fontClass: "fa fa-star",
direction: 0,
values : [20,20,20,20,20],
}
};
var div = document.getElementById("myRatingPopover");
var amcRating = new Askmethat.AskmethatRating(div, 0, options);