Simple setup, don't think my binding calls are working...

May 3, 2013 at 7:54 PM
Edited May 3, 2013 at 8:04 PM
Trying this plugin out on a site. The star rating is functioning on the site, I can hover and select a star no problem. But when I do select a star, nothing happens. Ultimately I want to send the number value to a hidden field so it can be submitted with the rest of the form. But for now I was just trying to get an alert on click. I'm no javascript wizard so any help would be great, thanks!

using jQuery 1.8.3
<script type="text/javascript" src="/js/star_rating/jquery.rateit.min.js"></script>

<script type="text/javascript">
    $('.rateit').bind('rated', function() { alert('rating: ' + $(this).rateit('value')); });

<li><label for="rating">How many stars?</label>
    <select id="rating">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <div class="rateit" id="rateit" data-rateit-backingfld="#rating" data-rateit-step="1" data-rateit-starwidth="26" data-rateit-starheight="23" data-rateit-resetable="false"></div>