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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:35:22+00:00 2026-06-16T02:35:22+00:00

Basically, I have 2 sliders implemented using Jquery. I want to set the value

  • 0

Basically, I have 2 sliders implemented using Jquery. I want to set the value in such a way that, when the first slider is selected say a range ex: 0-36. I want the second slider’s max value to be set dynamically to 36. Here is the code. I’m not able to set the value to the second slider pls help.

$(function() {
$( "#slider-range-min" ).slider({
        range: "min",
        value: 0,
        min: 0,
        max: 100,
        slide: function( event, ui ) {
            $( "#greenData" ).val( "0 - " + ui.value );
        }
    });
    $( "#greenData" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) );


});

    $(function() {
    $( "#slider-range-min-amber" ).slider({
            range: "min",
            value: 0,
            min: 0,
            max: 100,
            slide: function( event, ui ) {
                $( "#amberData" ).val( "0 - " + ui.value );
            }
        });
        $( "#amberData" ).val( "$" + $( "#slider-range-min-amber" ).slider( "value" ) );
    }); 

here is the HTML code:

<tr>
<td align="right"><label for="greenValue"
                            style="font-family: sans-serif; font-size: small;">
                                Green</label>
                                 </td>
                                 <td>   <div id="slider-range-min">  </div>  </td>
                                 <td> <input type="text" id="greenData" style="border: 0; color: green; font-weight: bold;" readonly="readonly" />  
                          </td>
                    </tr>

                    <tr>
                        <td align="right"><label
                            style="font-family: sans-serif; font-size: small;">
                                Amber</label>
                                 </td>
                                 <td id="amberTdId">    <div id="slider-range-min-amber">  </div>    </td>
                                 <td> <input type="text" id="amberData" style="border: 0; color: #FF7E00; font-weight: bold;" readonly="readonly" /> </td>
                    </tr>

When I select the green slider’s range from 0-36 the value 36 should be set to the slider 2. ie,.. the second sliders range should be from min value:0 and max value: 36

How do i go abt it.
Thanks in advance.

  • 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-16T02:35:24+00:00Added an answer on June 16, 2026 at 2:35 am

    try this code:

    $(function() {
    $( "#slider-range-min-amber" ).slider({
            range: "min",
            value: 0,
            min: 0,
            max: 100,
            slide: function( event, ui ) {
                $( "#amberData" ).val( "0 - " + ui.value );
            }
        });
        $( "#amberData" ).val( "$" + $( "#slider-range-min-amber" ).slider( "value" ) );
    }); 
    
    $(function() {
    $( "#slider-range-min" ).slider({
        range: "min",
        value: 0,
        min: 0,
        max: 100,
        slide: function( event, ui ) {
            $( "#greenData" ).val( "0 - " + ui.value );
            var value = ui.value;
            var max = ui.value;
            $( "#slider-range-min-amber" ).slider("option","max",max).slider("value",value);
            $( "#amberData" ).val( "0 - " + ui.value );
    
        }
    });
    $( "#greenData" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) );
    });
    

    Or see my fiddle: http://jsfiddle.net/QPnxf/1/

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

Sidebar

Related Questions

I have a page that has multiple sliders (from http://www.switchonthecode.com/tutorials/using-jquery-slider-to-scroll-a-div ) and since each
I'm using JQuery's slider widget with non-linear values. Basically, I have my slider set
I have a jquery slider that I have built, basically just three pannels that
Basically I have a program that has 6 sliders that send a value through
I have a slider that has a fade-in and fade-out transition. It basically cycles
I'm using a WPF slider and have basically used it to implement a Pull
Im have written a small function that basically takes the currentPosition value as a
Recently, I have been trying to accomplish creating a full-width jQuery slider that would
I'm trying to make a simple jQuery panel slider and have it basically where
I have created an image slider in Flash using Actionscript 2. Basically I have

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.