Thursday, October 23, 2014

rating stars

Standard
HTML Code:
 

CSS Code:
.rating {
    float: left;
}
.rating span {
    font-size: 25px;
    cursor: pointer;
    float: right;
}

.rating span:hover, .rating span:hover ~ span{
    color: red;
}


      

JS Code:
$('.rating span').click(function(){
    alert($(this).attr('id'));
})

      

0 comments:

Post a Comment