Created
March 17, 2015 17:55
-
-
Save webinfinita/71a532f047ea834ce94e to your computer and use it in GitHub Desktop.
Common helper functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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