Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8841151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:38:30+00:00 2026-06-14T10:38:30+00:00

I am using jRating a star rating found on http://www.myjqueryplugins.com/jquery-plugin/jrating on that same page,

  • 0

I am using jRating a star rating found on
http://www.myjqueryplugins.com/jquery-plugin/jrating

on that same page, they have options that you can configure as you pleased. except one that I’m looking for.

I like to have a default value let say 1, 2 or 5 star rating for some images. How can I can do that? I’m using jQuery and ajax or xml to get data from the server and assign it to the option that I couldn’t find. I do not know anything about php so their example wasn’t helpful at all. any help will be great. Thank you.

<script type="text/javascript">
    $(document).ready(function(){
        $(".exemple2").jRating({
            rateMax: 5,
            showRateInfo: false,
            isDisabled:true,
            value: 3,<----------- option like this is not available how can I can do this 
            length : 5 // nb of stars
        });
    });
</scrip>


<!-- basic exemple -->
<div class="exemple">
    <!-- in this exemple, 12 is the average and 1 is the id of the line to update in DB -->
   <div class="exemple2" id="12_1"></div>
    <!-- in this other exemple, 8 is the average and 2 is the id of the line to update     in DB -->
   <div class="exemple2" id="8_2"></div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:38:32+00:00Added an answer on June 14, 2026 at 10:38 am

    From what I understand from the examples and the source, you need to name the id of the div where you set up your rating component such that it should be something like x_y.
    where x is the proportion of rating that you want to give.

    For example if you want to have total 5 stars (length = 5) in your system. Examples:

    • If you want a default rating of 2.5, then x would be 10 [as 5*(10/20) = 2.5]. The Id of that div could be named as “10_2”.
    • If you want a rating of 4, then x would be 16 [as 5*(16/20) = 4]. The Id of that div could be named as “16_5”.

    [The score is calculated from 20. Number of stars is configurable]

    You may fetch the data in whichever manner you please to, however, while creating the divs for rating, you will have to follow this naming convention to use this plugin [from what I understand].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this plugin http://www.myjqueryplugins.com/jRating I downloaded it and tried it on a
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
i am using jRating plugin. Everything works fine, thing is... the images of the
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using jQuery, how do I get the value from a textbox and then load
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle
Using Yii, I want to delete all the rows that are not from today.
Using EF Code First I have an model object that has multiple properties that
Using jQuery, one can easily find out whether a particular element is visible using
Using SSRS 2008 R2 I have a background process that dynamically generates RDL for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.