jRating Starscript still working?

Hey guys,

I wanted to implement this star rating script but I cant get the jquery to work. I uploaded the 2 .js files, the min.js file the .css file and the 3 pictures to my host account. Then I changed the path from jquery/…js to …js.

Using the following code all the page displays is “Hi”

<meta charset = "utf-8">
<link rel="stylesheet" href="jRating.jquery.css" />
<script type = "text/javascript" src ="jquery.js"></script>
<script type = "text/javascript" src ="jRating.jquery.js"></script>
<script type = "text/javascript">
		   decimalLength: 1,
		   rateMax: 5
 <div class="rating">Hi</div>


Anyone know if the script is still working?

Thank you

Forgot to post the link.

Yes, it does. jRating demo

Here is a sample initialisation from their documentation.

<!-- JS to add -->
<script type="text/javascript">

That’s not what you chose to do. Your code is looking for elements that have yet to be rendered.

No, his code seems to be fine in that regard. $(function () { … }); does the same job as $(document).ready(function () {…});

See http://api.jquery.com/jQuery/#jQuery3

Thanks for the replies :slight_smile:

I think I did something wrong during the upload process. If I just upload the (i) jRating.jquery.min.js , (ii) the jquery.js and the (iii) jRating.jquery.css and put them into a folder called jquery.

And change the 3 lines to

<link rel="stylesheet" href="jquery/jRating.jquery.css" />
<script type = "text/javascript" src ="jquery/jquery.js"></script>
<script type = "text/javascript" src ="jquery/jRating.jquery.js"></script>

then it should work?

It seems like the paths in the java documents all require a jquery/… in front of the file unless I change it.

We can help you to figure out what the problem is, but in order to do that we need you to link us to a page of yours that is experiencing the problem.

I sent you a private message with the link to my site.
I really appreciate your help.

Thanks for the link - the problem that you’re having is in relation to the id attribute. See http://www.myjqueryplugins.com/jRating

Interesting, I changed the div field to id"1_1" and it still didnt work. Then I removed the “Hi” and it worked.
Thanks a lot, saved me a ton of time.
Appreciate it :slight_smile: