Hei friends. I've got a problem with getting the max and min value from select box(html). I want to get MAX AND MIN value from selectbox with jquery or javascript.
Here is the markup, simple range slider.
$('#slider').slider({
range: true,
min: 0,//HERE I WANT TO GET VALUES
max: 40,
step: 10, // Use this determine the amount of each interval
values: [ 20, 40 ], // The default range
slide: function( event, ui ) {
// for input text box
$( "#amount" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] );
// Display and selected the min Price
$( "#my_min" ).val(ui.values[ 0 ]);
// Display and selected the max Price
$( "#my_max" ).val(ui.values[ 1 ]);
}
});
I want to get them from the select box, select box will be dynamicly filled by PHP. Here is the code:
<select id="my_min" class="price_range">
<?php //dynamicly filled options
while($row=mysql_fetch_array($query))
{echo "<option>".$row['values']."</option>";}
?>
</select>
Thanks for help.