<link rel="stylesheet" type="text/css" href="style.css">
<link type="text/javascript" src="jquery-1.10.2.min.js">
<link type="text/javascript" src="jquery-latest.min.js">
<body>
<div class="rating_box">
<div class="star1 rating_stars"></div>
<div class="total votes">Votes</div>
</body>
</html>
<script>
$('.ratings_stars').hover(
// Handles the mouseover
function() {
$(this).prevAll().andSelf().addClass('ratings_over');
$(this).nextAll().removeClass('ratings_vote');
},
// Handles the mouseout
function() {
$(this).prevAll().andSelf().removeClass('ratings_over');
set_votes($(this).parent());
}
);
</script>
Why is this not working when i hover my mouse. the image is supposed to change isn't it? Am i doing anything wrong with the code?? PLease help my CSs style is
.rating_stars
{
background:url('star_empty.png') no-repeat;
height:20px;
width:20px;
padding:2px;
float:left;
}
.ratings_vote
{
background:url('starfull.png') no-repeat;
}