特效描述:利用jQuery实现 星星打分 评分插件。利用jQuery实现星星打分评分插件
代码结构
1. 引入JS
2. HTML代码
$("#star_grade").markingSystem({
num: 5,
havePoint: true,
haveGrade: true,
unit: '星',
grade: 2.5,
height: 20,
width: 20,
})
$("#star_grade1").markingSystem({
backgroundImageInitial: 'images/love_gary.png',
backgroundImageOver: 'images/love_red.png',
num: 5,
havePoint: false,
haveGrade: true,
unit: '星',
grade: 3,
height: 30,
width: 30,
})
$("#star_grade2").markingSystem({
backgroundImageInitial: 'images/face_ku_bottom.png',
backgroundImageOver: 'images/face_ku_top.png',
num: 5,
havePoint: true,
haveGrade: true,
unit: '星',
grade: 1
})
$("#star_grade3").markingSystem({
backgroundImageInitial: 'images/face_happy_bottom.png',
backgroundImageOver: 'images/face_happy_top.png',
num: 5,
havePoint: true,
haveGrade: true,
unit: '星',
grade: 1,
height: 32,
width: 32,
})