Closed zuber143 closed 7 years ago
You just have to call .offcanvas('hide')
if you click outside the div. Select everything and exclude the canvas.
Untested example:
var canvas = $('#your-selector');
$('html').not(canvas).click(function() {
canvas.offcanvas('hide');
});
How to make a closing a sliding div when you click outside of it?