I've got this script to calculate how much you can get with the amount you are donating.
$(function() {
var ovalue = 65;
var kann = 1;
$("#slider").slider({
value: ovalue,
min: 65,
max: 650,
step: 65,
slide: function(event, ui) {
$("#amount").val(ui.value + " Euro");
kann = ($("#slider").slider("option", "value") / ovalue >> 0);
$("#kann").val(kann);
}
})
});
the variable kann represents the amount you can get.
At first, kann gets 1 as result because 65/65 is 1. If I move the slider kann should be 2. But 130/65 still is one, although the euro amount changes to 130€. 195€ is 2, etc.
If I am at 195€ and I go back to 130€ kann isn't 1 anymore (which is also false) but kann becomes 3...really? :)