lila/public/javascripts/account.js
2018-04-07 21:10:16 +02:00

24 lines
592 B
JavaScript

$(function() {
$('.security.content_box table form').submit(function() {
$.post($(this).attr('action'));
$(this).parent().parent().fadeOut(300, function() { $(this).remove(); });
return false;
});
$('form.autosubmit').each(function() {
var $form = $(this);
$form.find('input').change(function() {
$.ajax({
url: $form.attr('action'),
method: $form.attr('method'),
data: $form.serialize(),
success: function() {
$form.find('.saved').fadeIn();
lichess.reloadOtherTabs();
}
});
});
});
});