I\'m making a WordPress website for agency where I will go work. I used Bootstrap 3.0, and I created a responsive menu.
How to hide menu when is collapsed and visible (
This is a functional solution:
$(document).on('click touchstart', function (e) { if ($(e.target).closest(".navbar-collapse").length === 0 && $(e.target).closest('[data-target=".navbar-collapse"]').length === 0) { $(".navbar-toggle").collapse('hide'); } });