[eluser]dua0410[/eluser]
.rate_widget {
border: 1px solid #CCC;
overflow: visible;
padding: 10px;
position: relative;
width: 180px;
height: 32px;
}
.ratings_stars {
background: url('http://i52.tinypic.com/242a0qq.png') no-repeat;
float: left;
height: 28px;
padding: 2px;
width: 32px;
}
.ratings_vote {
background: url('http://i51.tinypic.com/23uu3o1.png') no-repeat;
}
.ratings_over {
background: url('http://i52.tinypic.com/2qvfg5h.png') no-repeat;
}
<h4> Rate details about the advertisment</h4>
<div class='rate'>
<h5> How accurate was the item description?</h5>
<div id="q1" class="rate_widget">
<div class="star_1 ratings_stars" id="1"></div>
<div class="star_2 ratings_stars" id="2"></div>
<div class="star_3 ratings_stars" id="3"></div>
<div class="star_4 ratings_stars" id="4"></div>
<div class="star_5 ratings_stars" id="5"></div>
</div>
</div>
[removed]
$('.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');
}
);
//Hey I am developing a rating engine... I have kind of devloped the stars part. But i am not able to understand as how to give the click functionality to my stars and how will the value of stars be stored in my database. Can you please help me? I am new to codeigniter.