0

I got TypeError: b is undefined in my web app. I included latest version jquery and i check same id is exist.

jQuery(document).ready(function ($) {

$('#instantquotebtn').on('click', function() {


    if($("#instantquotefrm").validate()){    

        alert("Validation OK");
    }

});

});
Karthik
  • 5,589
  • 18
  • 46
  • 78
  • Where is the HTML markup for this? – Sparky Feb 10 '18 at 17:28
  • The `.validate()` method is only used for initializing the plugin, not for triggering validation. You would never put `.validate()` inside of a `click` handler or a conditional statement. It makes no sense here. Once properly initialized, the click is *automatically* captured and the form is validated. You also **must** have a unique `name` attribute on all form elements being validated. – Sparky Feb 10 '18 at 17:38

0 Answers0