Help with jquery code
Help with jquery code
Hi,
I have this script, effectively that calculates the price, from a few variables, as you can see.
I need to do some calculations within the script with the final price from this script, so need to have the final price as a variable. I have tried several things to achieve this, but have not been able to.
$(function() {
$("#slider").slider({
value:00,
min: 0,
max: 2500,
step: 5,
slide: function(event, ui) {
$("#amount").val(ui.value);
$("#price").val('£'+ui.value*$("#rate").attr("value"));
}
});
$("#amount").val($("#slider").slider("value"));
$("#price").val('£' + $("#slider").slider("value"));
});
// var price=$("#price").val('£'+ui.value*$("#rate").attr("value"));
// ??
Any help would be greatly appreiciated,
Thank you.