# starrr **Repository Path**: mirrors/starrr ## Basic Information - **Project Name**: starrr - **Description**: Starrr 是一个轻量级的 jQuery 插件,通过此插件你可以给出 1 到 5 个星星进行评分,它十分易用,并且很容易就能集成到你的 Web 应用上 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: gh-pages - **Homepage**: https://www.oschina.net/p/starrr - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-17 - **Last Updated**: 2025-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README starrr ====== 1-5 (or 1-`n`) star rating in < 75 lines of code. ## Requirements - jQuery ## Usage ### Create the stars ```html
``` ```js $('.starrr').starrr() ``` ### With an existing rating ```js $('.starrr').starrr({ rating: 4 }) ``` ### With more than 5 stars ```js $('.starrr').starrr({ max: 10 }) ``` ### Read-only ```js $('.starrr').starrr({ readOnly: true }) ``` ### Do something with the rating... ```js $('.starrr').starrr({ change: function(e, value){ alert('new rating is ' + value) } }) ``` Or if you prefer events: ```js $('.starrr').on('starrr:change', function(e, value){ alert('new rating is ' + value) }) ``` ## Developing - `npm install` - `npm install -g grunt-cli` - Make changes in `src/` - Run `grunt` to compile them ## License MIT