I need to check only if the modal is open, because if I open it and then I close it, and I press the button that opens the modality, it does not work, because it does the jquery check, but not shown because the modal was rejected.
So, I want to declare jquery if the modal is open, so I am checking if this is possible?
<script> $(document).ready(function(){ var validator =$('#form1').validate( { ignore: "", rules: { usu_login: { required: true }, usu_password: { required: true }, usu_email: { required: true }, usu_nombre1: { required: true }, usu_apellido1: { required: true }, usu_fecha_nac: { required: true }, usu_cedula: { required: true }, usu_telefono1: { required: true }, rol_id: { required: true }, dependencia_id: { required: true }, }, highlight: function(element) { $(element).closest('.grupo').addClass('has-error'); if($(".tab-content").find("div.tab-pane.active:has(div.has-error)").length == 0) { $(".tab-content").find("div.tab-pane:hidden:has(div.has-error)").each(function(index, tab) { var id = $(tab).attr("id"); $('a[href="#' + id + '"]').tab('show'); }); } }, unhighlight: function(element) { $(element).closest('.grupo').removeClass('has-error'); } }); }); </script>
jquery validation twitter-bootstrap modal-dialog
Mariana Hernandez Oct 21 '13 at 23:42 on 2013-10-21 23:42
source share