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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:59:44+00:00 2026-05-25T19:59:44+00:00

We have a ui slider we utilise, and it works flawlessly. code: jQuery(function() {

  • 0

We have a ui slider we utilise, and it works flawlessly.

code:

jQuery(function() {
jQuery( "#slider-range-min" ).slider({
    range: "min",
    value: 1,
    step: 1000,
    min: 0,
    max: 5000000,
    slide: function( event, ui ) {
        jQuery( "#amount" ).val( "$" + ui.value );
    }
});
jQuery( "#amount" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) );
});

As you can see we allow user to pick anything between 0 and 5,000,000.

Html is:

<div id="slider-range-min" style="width: 460px; float:left;margin:10px;"></div>

What I want to do is add a text input element which works in harmony with the slider, so as user slides the texy box increases, decreases whatever..

Or if the user types numbers into the input element the slider moves appropriately.

Any help please ?

Preview is:

enter image description here

  • 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-25T19:59:44+00:00Added an answer on May 25, 2026 at 7:59 pm

    You need to update the input element (like you’re doing now for the #amount element) on slide:

    $("#slider").slider({
        range: "min",
        value: 1,
        step: 1000,
        min: 0,
        max: 5000000,
        slide: function(event, ui) {
            $("input").val("$" + ui.value);
        }
    });
    

    Additionally, you need to bind to the change event for the input element and call the slider’s value method:

    $("input").change(function () {
        var value = this.value.substring(1);
        console.log(value);
        $("#slider").slider("value", parseInt(value));
    });
    

    Example: http://jsfiddle.net/andrewwhitaker/MD3mX/

    There’s no validation going on here (you must include the “$” sign for it to work). You could add some more robust input sanitation to enhance it.

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

Sidebar

Related Questions

I have a slider defined like so: $(#slider).slider({ orientation: vertical, range: min, min: 0,
I have a slider made with jQuery UI, which works completely fine, except that
I have jQuery slider code that I want to populate via a JSON url.
I have 1 slider and 1 button: <div data-role=fieldcontain> <input type=range name=slider id=slider value=0
I'm trying to get the jQuery slider to have set values to slide to
In the iPhone or Android, if you have a JQuery Slider, it doesn't quite
I have a vertical slider that works well except when it needs to scroll
I have a slider that rotates between different divs nicely with the following code:
I have a slider with minimum value 0 and maximum value 1 . When
I have a slider and I want to call a specific function only when

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.