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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:33:03+00:00 2026-06-18T06:33:03+00:00

I try to make it as simple as possible: I have six jQuery UI

  • 0

I try to make it as simple as possible: I have six jQuery UI sliders, I need to take their values if they’re value is different from 0, and display an average, and is driving me crazy so far.

Basically I have six of these (their names go from pm_rating_c1, pm_rating_c2, etc..):

<input type="hidden" name="pm_rating_c1" value="60">

I need to output the average in “real time” in this input field:

<input type="text" class="rwmb-text" name="pm_overall_score" id="pm_overall_score" value="" size="30">
  • 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-18T06:33:05+00:00Added an answer on June 18, 2026 at 6:33 am

    Check this out I made a class so it would be easier to loop through

    http://jsfiddle.net/6SftR/

    JS CODE

    var sum = 0 ; 
     var nums = 0;
    $('.slider').bind({
    
        slidechange : function(event,ui) {
          sum = 0;
          nums  = 0;
        $('.slider').each(function(){
    
            var value = $( this ).slider( "option", "value" );
            if(value > 0 ) 
             {
                sum += value ; 
                nums++;
              }
    
            }); 
           var avg = sum / nums ; 
           $('.average').val(Math.floor(avg));
           console.log(avg); 
        }
    }).slider();
    

    HTML CODE

    <div class="slider"></div>
    <div class="slider"></div>
    <div class="slider"></div>
    <div class="slider"></div>
    <div class="slider"></div>
    <div class="slider"></div>
    
    
        <input type="text" class="average" name="pm_overall_score" id="pm_overall_score" value="" size="30">
    

    I hope this will help

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

Sidebar

Related Questions

I'll try to make this as simple as possible. I'm working on a site
Alright, I'll try and make this as simple as possible. I'm trying to create
I have an assignment and I need to make my own (simple) generic linked
Alright, I will try to make this is as simple as possible, without being
Newbie question, let me try and make this as clear as possible. I have
I have a need to see whether or not it is possible to make
Alright, I'll try and make this as simple as possible (I was seeming to
I'm pretty new to PHP, but I decided to try and make a simple
I wanted to make some simple file recovery software, where I want to try
Ok, so I'll try to make that question a little more simple. The core

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.