Cannot get RateIt to Show Up

Feb 27, 2012 at 12:17 AM

I have referenced Jquery 1.7.1 min.  I have referenced the RateIt css.

I have tried this in Chrome and IE.

It seems so simple!  I have the <div class="rateit"></div> in place.  

Page showing the issue can be found here: https://seattle.codecamp.us/vote

Rest of the page is a work in progress but thanks for the help!

Chris

Feb 27, 2012 at 1:49 AM

Got a touch further.  If I add this on the ready

<script type="text/javascript">
    $(document).ready(function () {
        $("div.rateit").each(function () {
            $(this).rateit()
        });
    });
</script>
then I get it the functionality.  For some reason the rateit() that is called as part of including the file is not sufficient.

Coordinator
Feb 27, 2012 at 6:12 AM
Edited Feb 27, 2012 at 8:04 AM
Hi Chris,
Thanks for reporting the issue. I will have a look at it later today.
Gidon

 

Coordinator
Feb 27, 2012 at 8:04 AM

Probably you have the RateIt script in the head of your page, it's advisable to put it on the bottom, to speed up loading.

The call in the script that registers automatically all the .rateit items, doesn't wait for document.ready. So if it is in the head, it will find no occurence of elements with the rateit class.

I will fix this, but as I said, its anyway advisable to place the RateIt script just before </body>

Feb 27, 2012 at 6:18 PM

You nailed it.  I read the documentation as place it before your <body> tag.  Missed the /

Thanks!