Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
124
rated 0 times [  128] [ 4]  / answers: 1 / hits: 55322  / 10 Years ago, wed, july 9, 2014, 12:00:00

I have a modal in which I need to validate some input using knockout validation.
When I click the submit button, a function is called that validates the data. The following functionality is expected:




  • If the validation fails, the modal stays open and the validation reason is displayed.

  • If the validation succeeds, I want to close the modal.



How can I go about closing the modal inside my function?


More From » jquery

 Answers
107

What have you tried so far?



Per the Bootstrap documentation



$('#myModal').modal('hide')


Please read through the documentation!


http://getbootstrap.com/javascript/#modals


[#70259] Monday, July 7, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tayla

Total Points: 681
Total Questions: 102
Total Answers: 108

Location: Marshall Islands
Member since Tue, Sep 21, 2021
3 Years ago
tayla questions
Fri, Mar 5, 21, 00:00, 3 Years ago
Wed, Oct 28, 20, 00:00, 4 Years ago
Thu, Apr 9, 20, 00:00, 4 Years ago
;