I want an "imdb" star ranking system, but the element only appears once inside the cycle.
Script:
<script>
$(document).ready(function () {
$(function () {
$("#rateYo").rateYo({
onChange: function (rating, rateYoInstance) {
$(this).next().text(rating);
}
});
});
});
</script>
Html:
@foreach (var item in ViewBag.catequizandoSessao)
{
<tr>
<td>
<div id="rateYo"></div>
<div class="counter"></div>
</td>
</tr>
}