Skip to content

Instantly share code, notes, and snippets.

@nguyenvanduocit
Last active September 4, 2015 16:19
Show Gist options
  • Save nguyenvanduocit/fcd2c6147665ce91ff0b to your computer and use it in GitHub Desktop.
Save nguyenvanduocit/fcd2c6147665ce91ff0b to your computer and use it in GitHub Desktop.
(
function($){
$( document ).ready(function() {
var isProcessing = false;
var regenerateStatus = $('#regenerateStatus');
var statusString = $('#statusString');
$(document).on('click', '#startStopRegenerate', function(e){
e.preventDefault();
var $startStopRegenerateButton = $('#startStopRegenerate');
if(!isProcessing){
isProcessing = true;
regenerateStatus.show();
$startStopRegenerateButton.text('Dừng lại');
}
else
{
isProcessing = false;
$startStopRegenerateButton.text('Bắt đầu');
}
});
});
}
)(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment