mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 10:22:43 +01:00
8bc95f7b0e
* Implement Titan Tokens clientside * Titan Tokens can be modified in the admin panel
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();
|
|
});
|
|
})(); |