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

A simple, animated jQuery star rating jQuery plugin which uses CSS3 transitions to smoothly update the rating control on click.

Rating star-rating

Documentation

jquery.voteStar.js

一个简单的评分插件

Example

安装:

step1:
<link rel="stylesheet" href="dist/voteStar.css">
step2:
<span class="event_star star_in" data-starnum="3.5"><i></i></span>

class有3个可选值star_in/star_big/star_small
data-starnum可设置默认的分数

step3:
<script src="path/to/jquery-1.9.1.min.js"></script> <script src="path/to/jquery.voteStar.js"></script>
step4:
$(function(){ 	$('.event_star').voteStar({'选项名称': 选项值})		 })

选项:

moveStar: 鼠标move时点亮星星

default: false options: boolean (true / false)

starLength: 星星数量

default: 5 options: number

precise: 精确点亮星星

default: false options: boolean (true / false)

starAnimate: 点亮时缓慢动画

default: true options: boolean (true / false)

callback: 点亮后,执行什么操作? 带参数当前点击对象和分数

default: null options: function(starObj, starNum){}

You May Also Like