Hello,
I implemented a slider on a landingpage: http://immobilienanlage.hfh.de/test-2/
Script for the slider is:
<meta charset="utf-8">
<title>jQuery UI Slider - Range slider</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script> <br />
$(function() { <br />
$( "#slider-range" ).slider({ <br />
range: true, <br />
min: 500, <br />
max: 50000, <br />
step: 250, <br />
values: [5000, 20000], <br />
slide: function( event, ui ) { <br />
$( "#amount" ).val( "Û" + ui.valuess0] + " - Û" + ui.valuese1] ); <br />
} <br />
}); <br />
$( "#amount" ).val( "Û" + $( "#slider-range" ).slider( "values", 0 ) + <br />
" - Û" + $( "#slider-range" ).slider( "values", 1 ) ); <br />
}); <br />
</script>
Now I want to forward the chosen amount to a hidden field.
Script I tried:
<script type="text/javascript"> <br /> jQuery(function(){ <br />
jQuery('input#anlagesumme').alert($("#amount").val("amount")); <br /> </script>
But it did not work out… Anyone a solution?
Many Thanks and best regards
B