#HTML - fontawsome 이용
<i class="fa fa-star-o fl as" aria-hidden="true" onmouseover="mover(this);" onmouseout="mout(this);" onclick="mclick(this);"></i>
<i class="fa fa-star-o fl as" aria-hidden="true" onmouseover="mover(this);" onmouseout="mout(this);" onclick="mclick(this);"></i>
<i class="fa fa-star-o fl as" aria-hidden="true" onmouseover="mover(this);" onmouseout="mout(this);" onclick="mclick(this);"></i>
<i class="fa fa-star-o fl as" aria-hidden="true" onmouseover="mover(this);" onmouseout="mout(this);" onclick="mclick(this);"></i>
<i class="fa fa-star-o fl as" aria-hidden="true" onmouseover="mover(this);" onmouseout="mout(this);" onclick="mclick(this);"></i>
#JavaScript
function mover(obj){
$(obj).prevAll().andSelf().addClass("fa-star");
$(obj).prevAll().andSelf().removeClass("fa-star-o");
}
function mout(obj){
$(obj).prevAll().andSelf().addClass("fa-star-o");
$(obj).prevAll().andSelf().removeClass("fa-star");
}
function mclick(obj){
$(".as").attr('onmouseout','');
$(".as").attr('onmouseover','');
$(obj).prevAll().andSelf().addClass("fa-star");
$(obj).prevAll().andSelf().removeClass("fa-star-o");
console.log($(obj).next().attr('class'));
if($(obj).next().attr('class') == "fa fl as fa-star" || $(obj).next().attr('class') == null){
$(obj).nextAll().addClass("fa-star-o");
$(obj).nextAll().removeClass("fa-star");
}
var sr = document.getElementById('star_result');
}