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

  • SEARCH
  • Home
  • 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 9272771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:56:43+00:00 2026-06-18T15:56:43+00:00

I am using jQuery Raty Plugin which is a star rating plugin and it

  • 0

I am using jQuery Raty Plugin which is a star rating plugin and it ss working fine .

Here is my code

 $('#star').raty({
            path: '/Content/RatingPlugin/',
            numberMax: 5,
            score: function () {
                return $(this).attr('data-score');
            }
        });

HTML

<div id="star" data-score="@Model.Company.Rating"></div>

Now there are 2 problems, suppose when my page load @Model.Company.Rating value is 4 it will show 4 stars on which is right but if any one click on the third star it will off that 4th star and then only 3 stars will be on. I want that if a user click on any star then in javascript I get the value of that star and store that on database but it should not takle effect on user side I mean after clicking of user amount of on stars will remain same.

If you need any other detail please let me know .

  • 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-18T15:56:44+00:00Added an answer on June 18, 2026 at 3:56 pm

    http://jsfiddle.net/DerekL/bp2mW/18/

    $('#star').raty({
        score: 3,                                                    //default score
        starOn: "http://wbotelhos.com/raty/lib/img/star-on.png",
        starOff: "http://wbotelhos.com/raty/lib/img/star-off.png",
        readOnly: true                                               //read only
    });
    
    $("#star > img").click(function(){
        var score = $(this).attr("alt");                             //record clicked
        alert(score);                                                // value of the
        //save to database                                              star
    });
    

    Learn more about readonly on the plugin’s docs.

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

Sidebar

Related Questions

I am using jquery star rating plugin Raty https://github.com/wbotelhos/raty . i am generating a
I'm using the jquery raty plugin http://www.wbotelhos.com/raty/ to make a form with star rating.
I'm using the jQuery Raty plugin and I would like to reset the rating
i am using jquery star rating plugin . I have a very problem: i
I'm trying to create a custom binding in KnockoutJS using the raty jQuery plugin
I am using a jQuery rating plugin inside a asp:listview with in a asp:update
I am working on image gallery project using ASP.NET MVC3 and jQuery Cycle Plugin.
using jquery's .post i send do my php code an object that with var_dump
I am trying to use the jQuery raty plugin to display multiple ratings on
I am trying to get jquery.raty working with Django. I have the serving of

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.