<script type="text/javascript" src="jquery.rater.js"></script>
<link href="jquery.rater.css" rel="stylesheet"/>
$('#demo1').rater();
var options = {
value : 1
}
$('#demo2').rater(options);
var options = {
value : 1,
enabled : false
}
$('#demo3').rater(options);
var options = {
max : 10
}
$('#demo4').rater(options);
var options = {
after_click : function(ret) {
$('#demo5 + input').val(ret.number);
}
}
$('#demo5').rater(options);
var options = {
url : 'ajax.php',
after_ajax : function(ret) {
alert(ret.ajax);
}
}
$('#demo6').rater(options);
var options = {
min : 5,
max : 10,
step: 0.5,
url : 'ajax.php',
after_ajax : function(ret) {
alert(ret.ajax);
}
}
$('#demo7').rater(options);
var options = {
url : 'ajax.php',
method :'GET',
after_ajax : function(ret) {
alert(ret.ajax);
}
}
$('#demo8').rater(options);
var options = {
image : 'star2.gif',
width : 16,
height : 16
}
$('#demo9').rater(options);
var options = {
max : 10,
after_click : function(ret) {
this.value = ret.value;
this.enabled= false;
$('#demo10').rater(this);
}
}
$('#demo10').rater(options);
var options = {
max : 10,
title_format : function(value) {
var title = '';
switch (value) {
case 1 :
title = '一';
break;
case 7 :
title = '七';
break;
default :
title = value;
break;
}
return title;
}
}
$('#demo11').rater(options);