jQuery

【jQuery】jQueryレーティングプラグインjsRapStar

June 13, 2018
jsRapStar

jsRapStarはjQueryレーティングプラグイン。

Usage

<link rel="stylesheet" href="jsRapStar.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="jsRapStar.js"></script>
<script>
$(document).ready(function(){
$('#demo1').jsRapStar();
$('#demo2').jsRapStar({enabled:false});
$('#demo3').jsRapStar({colorY:'rapStarCG',colorW:'rapStarCY'});
$('#demo4').jsRapStar({colorY:'rapStarCG',length:10,starWidth:32,starHeight:32,step:false,
onClick:function(score){
	alert(score);
},
onMousemove:function(score){
	$(this).attr('title','Ocena '+score);
}
});
});
</head>
<body>
Standard
<div id="demo1" start="3"></div>
Disable
<div id="demo2" start="4"></div>
Colors
<div id="demo3" start="2"></div>
Action
<div id="demo4" start="6"></div>
</body>
</script>