CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <table class="collapsible" style="margin-left:5px; width:180px">
- <tr>
- <td><input type="text" size="10" id="attribute_value_<?php echo $attribute_value_id; ?>_min" name="attr_slider[<?php echo $attribute_value_id?>][min]" value="<?php echo min($attribute_value['values']); ?>">
- </td>
- <td><input type="text" size="10" id="attribute_value_<?php echo $attribute_value_id; ?>_max" name="attr_slider[<?php echo $attribute_value_id?>][max]" value="<?php echo max($attribute_value['values']); ?>">
- </td>
- </tr>
- <tr>
- <td colspan="2"><div style="width:170px; margin-top:10px; margin-bottom:5px" id="slider-range-<?php echo $attribute_value_id; ?>"></div></td>
- </tr>
- </table>
- <script>
- var attr_arr_<?php echo $attribute_value_id; ?> = [<?php echo implode(',', $attribute_value['values']); ?>];
- $('#slider-range-<?php echo $attribute_value_id; ?>').slider({
- range:true,
- min:0,
- values:[0, <?php echo count($attribute_value['values'])-1; ?>],
- slide:function (a, b) {
- var min = attr_arr_<?php echo $attribute_value_id; ?>[b.values[0]];
- var max = attr_arr_<?php echo $attribute_value_id; ?>[b.values[1]];
- $("#attribute_label_<?php echo $attribute_value_id; ?>_min").html(min + '<?php echo $attribute_value['suffix']; ?>');
- $("#attribute_label_<?php echo $attribute_value_id; ?>_max").html(max + '<?php echo $attribute_value['suffix']; ?>');
- },
- stop:function (a, b) {
- var min = attr_arr_<?php echo $attribute_value_id; ?>[b.values[0]];
- var max = attr_arr_<?php echo $attribute_value_id; ?>[b.values[1]];
- $("#attribute_value_<?php echo $attribute_value_id; ?>_min").val(min);
- $("#attribute_value_<?php echo $attribute_value_id; ?>_max").val(max);
- iF()
- }
- });
- </script>