When trying to open and close a modal using the normal Bootstrap 4 method, everything seemed to be working fine. But in my specific scenario, I needed a second button to close the modal, and simply duplicating the first button wasn't doing the trick.
I attempted to use the code below:
$('#sitenav_close').trigger('click.dismiss.bs.modal')
Unfortunately, this didn't work either. Are there any other approaches or methods that can be used to successfully close a modal with a second button?