1👍
✅
I’m not sure if the problem is that the modal doesn’t disappear after posting, but if so – you can add to your success/error function the following line at the end:
$("#post_modal").modal('hide');
Hope that’s help
Cheers!
Source:stackexchange.com