$(function () { // Functions for mobile menu let $mobile_nav = $(".custom-mobile-nav"); let $mobile_nav_helper = $(".custom-mobile-nav-helper"); $('.custom-mobile-nav-topbar-close').click(function (){ $mobile_nav.css('left', '-250px'); $mobile_nav_helper.css('display', 'none'); }); $('.custom-mobile-bar-icon').click(function (){ $mobile_nav.css('left', '0'); $mobile_nav_helper.css('display', 'block'); }); });