landing-pages: Add working "×" for mobile navigation.

This adds a working "×" icon that you can click to close the nav
on the mobile product pages.

Fixes #5260.
This commit is contained in:
Brock Whittaker
2017-06-12 13:05:29 -07:00
committed by Tim Abbott
parent 414df5ef8b
commit 244c4dc7fa
4 changed files with 18 additions and 3 deletions

View File

@@ -150,10 +150,8 @@ var events = function () {
$("body").click(function (e) {
var $e = $(e.target);
var should_close = !$e.is("ul, .hamburger") && $e.closest("ul, .hamburger").length === 0;
// this means that it is in mobile sidebar mode.
if ($("nav ul").height() === window.innerHeight && should_close) {
if ($e.is("nav ul .exit")) {
$("nav ul").removeClass("show");
}
});