Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Bootstrap Star Rating | 1,038 | 763 | 12 | 2 months ago | 31 | September 20, 2021 | 2 | other | JavaScript | |
A simple yet powerful JQuery star rating plugin with fractional rating support. | ||||||||||
Jquery Bar Rating | 705 | 92 | 13 | 4 years ago | 6 | February 19, 2017 | 33 | mit | JavaScript | |
jQuery Bar Rating Plugin - minimal, light-weight jQuery ratings. | ||||||||||
Cfviz | 649 | 2 years ago | 6 | JavaScript | ||||||
Visualizes user data from codeforces.com using the official API | ||||||||||
Bootstrap Rating Input | 323 | 6 | 5 years ago | 1 | August 05, 2016 | 8 | mit | HTML | ||
Another plugin that eases the generation of rating stars for jQuery and Bootstrap | ||||||||||
Starrr | 196 | 423 | 3 years ago | April 25, 2016 | 15 | JavaScript | ||||
1-5 star rating, in jQuery. | ||||||||||
Rateit.js | 146 | 11 | 2 | 2 years ago | 8 | March 10, 2021 | 8 | mit | JavaScript | |
Rating plugin for jQuery. Fast, Progressive enhancement, touch support, icon-font support, highly customizable, unobtrusive JavaScript (using HTML5 data-* attributes), RTL support, supports as many stars as you'd like, and also any step size. | ||||||||||
Jquery Star Rating | 101 | 7 years ago | April 15, 2012 | 3 | JavaScript | |||||
jQuery Star Rating Plugin | ||||||||||
Angular Rateit | 50 | 6 | 5 years ago | 4 | May 04, 2018 | 2 | mit | JavaScript | ||
This directive was inspired by the jQuery (star)rating plugin RateIt. However this package will work without jQuery. | ||||||||||
Shipping Calculator | 46 | 7 years ago | 16 | JavaScript | ||||||
To use in Shopify to add a shipping rates calculator to the cart page. Requires jQuery. | ||||||||||
Restaurant Picker Jquerymobile Demo | 42 | 11 years ago | 1 | JavaScript | ||||||
A jQuery Mobile demo web app that enables the user to choose a restaurant based on plate, location and other user rating |
This directive was inspired by the jQuery (star)rating plugin RateIt. However this package will work without jQuery and is very light weight.
You can install an angular-rateit package easily using Bower:
bower install angular-rateit
And add the files to your index page:
<link rel="stylesheet" href="angular-rateit/dist/ng-rateit.css" />
<script src="angular-rateit/dist/ng-rateit.js"></script>
Finally add 'ngRateIt' to your main module's list of dependencies:
angular.module('myApp', [
...
'ngRateIt',
...
]);
To get it working simply add this block of code to your view:
<ng-rate-it ng-model="test.rateit"></ng-rate-it>
N.B. When using angular 1.2.* use <div ng-rate-it ng-model="test.rateit"></div>
For more advanced functionality you can add a couple attributes:
<ng-rate-it
ng-model = "String, Number, Array"
min = "Double"
max = "Double"
step = "Double"
read-only = "Boolean"
pristine = "Boolean"
resetable = "Boolean"
star-width = "Integer"
star-height = "Integer"
rated = "Function(rating)"
reset = "Function(rating)"
before-rated = "Function(newRating): return promise"
before-reset = "Function(rating): return promise"
>
</ng-rate-it>
Attribute | Description | Value | Default |
---|---|---|---|
ng-model | Object bound to control. (Required) | String, Number, Array | - |
min | Minimal value. | Double | 0 |
max | Maximal value. The difference between min and max will provide the number of stars. | Double | 5 |
step | Step size. | Double | 0.5 |
read-only | Whether or not is readonly. | Boolean | false |
pristine | Whether or not the current value is the initial value. | Boolean | true |
resetable | When not readonly, whether to show the reset button. | Boolean | true |
star-width | Width of the star picture. | Integer | 16 |
star-height | Height of the star picture. | Integer | 16 |
cancel-width | Width of the cancel icon. | Integer | star-width |
cancel-height | Height of the cancel icon. | Integer | star-height |
rated | Fired when a rating happened. (Obtain the rated value by the model) | Function | - |
reset | Fired when the reset button was clicked. | Function | - |
before-rated | Fired before the item is actually rated. By rejecting the promise it is possible to cancel the rating. | Function: return promise | - |
before-reset | Fired before the item is actually reset. By rejecting the promise it is possible to cancel the reset. | Function: return promise | - |
You can easily add your own star style via css. You can use the star-width and star-height attributes to make the 'stars' bigger if necessary.
<style>
.custom.ngrateit .ngrateit-star{
background-image: url('custom.png');
}
</style>
<ng-rate-it ng-model="model.custom" class="custom"></ng-rate-it>
V4.0.0
rating
parameter:<ng-rate-it ng-model="model.basic" rated="myCallback(rating, 'Your own var')"></ng-rate-it>
$scope.myCallback = function (rating, cusotmVar) {
console.log(rating, customVar);
}
To upgrade from v3 to v4, just add ()
after your function name.
V3.0.0
over
callback is removed.Copyright (c) 2017 Arjan Kempes
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.