mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 22:47:04 +01:00
19 lines
612 B
JavaScript
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();
|
||
|
});
|
||
|
})();
|