ヘイフレンズ。select box(html)から最大値と最小値を取得する際に問題が発生しました。jqueryまたはjavascriptを使用してselectboxからMAXとMINの値を取得したい。
これがマークアップのシンプルな範囲スライダーです。
$('#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 ]);
}
});
選択ボックスから取得したいのですが、選択ボックスはPHPによって動的に入力されます。コードは次のとおりです。
<select id="my_min" class="price_range">
<?php //dynamicly filled options
while($row=mysql_fetch_array($query))
{echo "<option>".$row['values']."</option>";}
?>
</select>
手伝ってくれてありがとう。