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 6167701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:33:30+00:00 2026-05-23T22:33:30+00:00

We are using a jquery star rating script which is what we want exactly.

  • 0

We are using a jquery star rating script which is what we want exactly. We are trying to create a feature to work along side with it but it isn’t working due to the radio buttons being replaced?

This is what we have:
enter image description here

This is what we want to achieve:

enter image description here

Basically, what we are trying to do is create a feature that updates a percentage depending on what they chose, a “score” type of thing. It works perfectly if we take the rating script out – as it just runs straight from the radio buttons – but when we use the rating script, the radio buttons get replaced by just DIVs. When inspecting with firebug, we see the following:

<div class="ui-stars-star">
    <a title="">Average</a>
</div>

Which in pure HTML, is infact:

<label for="vote-19_5" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_5" value="Average" /> Average</label>

Here is our code:

An example rating:

<div class="ctrlHolder">
    <p class="label">Clean Green and Environmentally Friendly</p>
    <div class="multiField starify" id="question-19">
        <label for="vote-19_1" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_1" value="Very Poor" /> Very Poor</label>
        <label for="vote-19_2" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_2" value="Poor" /> Poor</label>
        <label for="vote-19_3" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_3" value="Not that Bad" /> Not that Bad</label>
        <label for="vote-19_4" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_4" value="Fair" /> Fair</label>
        <label for="vote-19_5" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_5" value="Average" /> Average</label>
        <label for="vote-19_6" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_6" value="Almost" /> Almost</label>
        <label for="vote-19_7" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_7" value="Good" /> Good</label>
        <label for="vote-19_8" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_8" value="Very Good" /> Very Good</label>
        <label for="vote-19_9" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_9" value="Excellent" /> Excellent</label>
        <label for="vote-19_10" class="blockLabel"><input type="radio" name="poll-19" id="vote-19_10" value="Perfect" /> Perfect</label>
    </div>
</div>

Here is where we want our feature to go:

Score: <div id="rating"></div>

Here is our JS to create the feature:

$('.starify :radio').live('click', function(){
var rating=0;
$('.starify :checked').each(function(){
rating += ($(this).parent().index()+1) * 0.5;
});

$('#rating').text(rating + ' %');
});

We just want to get our rating score % feature compatible with the star rating script, as the star rating script replaces the radio buttons with HTML and it causes the score % JS not to work. If we take out the star rating script, it works perfectly. (I can upload a demo of that too if needed).

We don’t even mind setting in our javascript variables, to define each word as a numeric value.

Demo: http://sitehelp.com.au/demos/starrating/demo7c.html

Any help would be greatly appreciated.

  • 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-05-23T22:33:31+00:00Added an answer on May 23, 2026 at 10:33 pm

    how about something like this?…

    $('.ui-stars-star').live('click', function(){
    var rating=0;
    $(this).parent().find(".ui-stars-star-on").each (function ()
    {
      rating += ($(this).parent().index()+1) * 0.5;
    });
    alert(rating);
    
    });
    

    we can even make it better by removing the loop:

    $('.ui-stars-star').live('click', function(){
       var rating=0;
    
       rating = $(this).parent().find(".ui-stars-star-on").length * ($(this).parent().index()+1) * 0.5;
    
       alert(rating);
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using this plugin: http://www.fyneworks.com/jquery/star-rating It includes a star.gif (which actually contains the star
I am using jQuery star rating control found at http://www.fyneworks.com/jquery/star-rating/#tab-Overview . I am using
I'm using the jquery star rating plugin by fyneworks. The problem is that about
i m using star rating plugin in jquery mobile to rate my docs my
I am using the Star Rating widget and I'm trying to set the initial
I'm using this plugin: http://www.fyneworks.com/jquery/star-rating/ Is it possible to put a click function inside
I am trying to create a html page with persistent footers using jquery mobile.This
Using the jQuery Star Rating plugin everything works well until I select a star
i am using jquery star rating plugin . I have a very problem: i
I'm using the jquery raty plugin http://www.wbotelhos.com/raty/ to make a form with star rating.

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.