Titan/webapp/titanembeds/static/js/donate.js
Jeremy "EndenDragon" Zhang 8bc95f7b0e Paypal (#41)
* Implement Titan Tokens clientside

* Titan Tokens can be modified in the admin panel
2017-08-13 18:10:03 -07:00

19 lines
612 B
JavaScript

/* global $ */
(function () {
$('#token-slider').on('input', function(){
var slider_value = $("#token-slider").val();
var multiplier = 100;
$("#money-display").text(slider_value);
$("#token-display").text(slider_value * multiplier);
});
$("#donate-btn").click(function () {
var slider_value = $("#token-slider").val();
var form = $('<form method="POST">' +
'<input type="hidden" name="amount" value="' + slider_value + '">' +
'</form>');
$(document.body).append(form);
form.submit();
});
})();