I want my menu to push the content to the right when clicked.
I've written the following to add .open class to the site .wrapper The .open class has a 'right: -320px' css rule so pulls the content to the right.
On second click of the menu icon I want the .open class removed so the content resolves back to left:0
var first_click = true;
links.onclick = function () {
if (first_click) {
$(".sidebar-menu_btn").click(function () {
setTimeout(function () {
$(".wrapper").addClass("open");
}, 250);
});
first_click = false;
} else {
$(".sidebar-menu_btn").click(function () {
setTimeout(function () {
$(".wrapper").removeClass("open");
}, 05);
});
}
}