Name | Description | Mandatory | Default |
---|---|---|---|
backgroundColor | Displayed background color when the ratings are not hovered/active/selected | false | #e5e500 |
hoverColor | Displayed background color when the ratings are hovered/active/selected | false | #ffff66 |
fontClass | This is the font class that you want to use with the current rating For example : "fa fa-star" | false | fa fa-star |
minRating | This is the minimum value that the user can select If the value is one, the user cannot set the rating to 0 | false | 1 |
maxRating | This is the wanted number of rating. Currently this is unlimited | false | 5 |
readonly | Disable all the events. The value can be set manually | false | false |
step | Step when you hover the rating. Askmethat.AskmethatRatingSteps["DecimalStep"] is 0.1 per 0.1 Askmethat.AskmethatRatingSteps["HalfStep"] is 0.5 per 0.5 Askmethat.AskmethatRatingSteps["OnePerOneStep"] is 1 per 1 | false | Askmethat.AskmethatRatingSteps["DecimalStep"] |
inputName | Allow to customize the hidden input name in the rating div (Set rating to readonly if input is set to disabled) | false | Askmethat.AskmethatRating |
popover | Popover options. If options are defined, the rating will display a popover and set rating to readonly | false | ( see below ) |
Name | Description | Mandatory | Default |
---|---|---|---|
color | Set color for the progress bar and the rating elements | true | N/A |
fontClass | This is the font class that you want to use with the current rating For example : "fa fa-star" | true | N/A |
direction |
Set direction of popover display 0 : Top 1 : bottom |
false | 1 : bottom |
values |
Array of int that equals to stats array for each rating elements Array items count should be equals to Rating Options maxRating Examples : [20,20,20,20,20] |
false | 1 : bottom |
Name | Description | Parameters | Usage |
---|---|---|---|
render | This function render a new set of rating into the parent element. |
|
amtRating.render(2);
|
value | Return the value for a specific rating element |
|
Askmethat.AskmethatRating.value("#myBasicRating")
|
Name | Description | Usage |
---|---|---|
amt-change | This function bind an event that is triggered when the user select a specific value |
changeDiv.addEventListener("amt-change", function(e){
alert(e.detail);
});
|