Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Common helper functions
$(document).ready(function(){
$('*[data-confirm]').on('click', function(e) {
var conf = confirm($(this).data('confirm'));
if(! conf) e.preventDefault();
});
$('body').on('hidden.bs.modal', '.modal', function () {
$(this).removeData('bs.modal');
});
$('form').submit(function(){
var btn =$(this).find('input[type=submit],button[type=submit]');
btn.attr('disabled', true);
btn.html("<i class='fa fa-cog fa-spin'></i> Procesando...");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.