2

I'm making an application to reserve seats on a train, but i need to discriminate between children and grown-ups, so i have settled two jquery-ui sliders (each one bound to a form element) the problem is here: the total number of chairs is 56 so both sliders have min: 1, max: 56 to start, but if the costumer selects 56 grown-ups and 56 childrens the train capacity won't suffice that demand (that I'm stupidly allowing), so I think i could just subtract the max: value, as I move the slider, but i couldn't (the code I'm showing is a bit cleaner that the one that i was using, to try to accomplish the subtract)

you can check the code I got so far here : http://jsbin.com/ezeqav/7

PD: thx in advance :D

(these is not the problem but, to put you a lil bit more in context, i have (with help from here ;D) built a calculator to show the costumer a total cost while he is setting the qtty of people by moving slider.)

0 Answers0