Reputation: 9595
I have a huge bootstrap modal.
<div className="add-date">
<div className="modal" id="eventSelectedModal" tabIndex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
<div className="modal-dialog" role="document">
<div className="modal-content">
<div className="modal-header">
....
I want it to close at the end of a function. So on submit I do:
$('#eventSelectedModal"').modal({show: false});
This doesn't seem to close the modal for some reason. Why?
Upvotes: 0
Views: 45
Reputation: 372
Try
$('#eventSelectedModal').modal('toggle');
Or better yet
$('#eventSelectedModal').modal('hide');
Upvotes: 2
Reputation: 1046
Believe you put an extra ' " ' <--- quote inside your jquery selector.
$('#eventSelectedModal"')
should be
$('#eventSelectedModal')
Upvotes: 0