Created
December 20, 2016 12:22
-
-
Save jgdoncel/c7a7bb4ff98b1c0aa64006d015ad8241 to your computer and use it in GitHub Desktop.
jquery.validate - Focus bootstrap tab with firts invalid element
This file contains 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
... | |
invalidHandler: function(e, validator){ | |
if(validator.errorList.length) | |
$('a[href="#' + jQuery(validator.errorList[0].element, '#tabs').closest(".tab-pane").attr('id') + '"]').tab('show') | |
}, | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Para un solo formulario con varias tabs, incluso dos niveles de tabs.