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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:13:56+00:00 2026-05-15T23:13:56+00:00

Here is a hard one I have been trying to get it work. It

  • 0

Here is a hard one I have been trying to get it work. It does work half way however I think the logic is the problem. I will explain the situation and the problem below.

Situation:
Want to use a slider controller to select number of Adult,Child,Infant that can occupy inside a room. For example, a Room which can accommodate 3 person, where the user can either use the sliders to select for example, 1 Adult, 2 Child and 0 Infant. However the user should not exceed total number of Adult + Child + Infant more than Room capacity. Few scenario examples are drafted below.

Room A with Capacity for 4 Pax and 1 Adult is required.
Adult/Child/Infant : 1/0/0 is less than 4 is OK
Adult/Child/Infant : 2/1/1 is equal to 4 is Ok
Adult/Child/Infant : 0/2/1 is less than 4 but NO Adult, therefore NOT OK

To use the jQuery UI slider, I have to set 3 sliders for each person type (Adult/Child/Infant) and set the sliders property in such a way that total Values should not exceed Room Capacity.

The sliders should not allow, for example if the room capacity of 4, where the Adult slider value is selected 3 and the child is selected as 1 then the infant slider should not be able to set any value as Adult + Child already filled the room and there is no space for any infant. Or if the Adult is selected the Max value which is 4 then the other two sliders for child and infant should not be able to set any values unless the Adult slider selected value reduces to allow space for child and infant.

So my problem is to code jQuery extended plugin to enable this to work on any selection of elements and setting the properties defining a master slider.
This logic may not be the best, thats why I need good ideas and if possible, some function that could enable the sliders to work together as group.

Please suggest me of any good method.

  • 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-15T23:13:57+00:00Added an answer on May 15, 2026 at 11:13 pm

    I think the solution would be to use the slide event like this:

    $("#mainSlider").slider({
       slide: function(event, ui) { 
                 //Insert logic here..
              }
    });
    

    And then you the method option :

    $("#secondarySlider").slider("max", x);
    

    to set max value of the other sliders calculated by your code.

    That’s how I would solve the UI part, then you have to calculate the values to set.

    You have the documentation here:
    http://jqueryui.com/demos/slider/

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

Sidebar

Related Questions

Here's a problem I ran into recently. I have attributes strings of the form
I'm having a hard time understanding some git/DCVS concepts. Here's what happened: I created
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here's a coding problem for those that like this kind of thing. Let's see
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here is my code, which takes two version identifiers in the form 1, 5,
Here is the scenario: I'm writing an app that will watch for any changes

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.