+1 vote
Good time of day. Can't figure out how to do it. The point: There is form. There is a dropdown list and have the numerical segment (million m2 and R) . Let's pay attention to this segment. It is made of jqueryui.com/slider/#range and has this html code
<div class="slider-range"></div>
<input type="text" id="amount" readonly>
<input type="text" id="amount1" readonly>
Themselves the numerical values of this section are taken from js
$(function() {
$( ".slider-range" ).slider({
range: true,
min: 10,
max: 120,
values: [ 40, 60 ],
step: 2,
slide: function( event, ui ) {
$( "#amount" ).val( ui.values[ 0 ] + "м2");
$( "#amount1" ).val( ui.values[ 1 ] + "м2");
$( "#amount" ).val( + $( ".slider-range" ).slider( "values", 0 ) + "м2")
$( "#amount1" ).val( + $( ".slider-range" ).slider( "values", 1 ) + "м2")
The idea is this: When I change the value in the "what" of the land, the js code in the numeric segment should find a different form. Change the values of min,max,and step values, as well as "m2" changed to ar (weaving). Forget about select. The change itself via select is not important, the important thing is the change itself through any action (e.g. button). I thought if you add another js code with the new settings and give it the value of the slider-range2, and in the html just change the class using toggleClass, I will get what I want... Anything like that. Changing the style settings of the segment do not change. I understand that if js is running, then its not the switch. Tell me what I can do in my case? 32d23b3045644901ad7641a0af92b24e.png

2 Answers

0 votes
It's easier to make different shapes for different types of areas. Online will need to switch. Setting items, the binding of the formulas and all the initialization happens only once.
initially in the range of 40-60m2. the customer can leave this parameter is not changed. Suddenly his suit this area
qqignatqq : what? is selected, this range will be sent this form, what next? I don't understand where is the problem? to duplicate these values in the form of another type of housing?
The letter will come to me in the mail will look like this: "the Customer wants to buy a plot of land with an area of 40-60m2, with an area of 2-4 acres."
It's so easy to send a single form with values from another. Only lacks some plot. Renovated, with Windows on the South side?
qqignatqq to send data from the form, which will choose the customer — what's the problem?
I understand that you propose to make one display block display none else? But then I will receive e-mails with m2 and acres.
+1 vote
qqignatqq try to create a global variable for example,
var go = {};
and he's got to create some necessary properties, for example,
go.min = 200;
go.max = 300;
And then in this moment
When I change the value in the "what" of the land, the js code in the numeric segment should find a different form.

You'll just have to change the data value global variable (and in fact are properties of the global variable object).
qqignatqq : Th complex-that is, create arrays of settings for different times so want, form classes and when you change class, read settings again
You don't know any working example? It so happened that I suck at js...
qqignatqq : I would be told would be more accurate if you accurately interpret. and that to me is not very clear what is happening and what should happen.))
there is jquery a select range. when a person changes the select then immediately changing the jquery range on depending on what select. the person chooses select "land", and then, right in the section area m2 weave is displayed, changing the min and max value of the range jqury, say,2 and 25, as well as values instead of 40 and 60 will be 7 and 9. If people decided not to buy the land and chose again, select "flat", all settings will return to its original position. please tell me at what point do you not understand? https://hsto.org/files/32d/23b/304/32d23b304564490...