I’m performing this very simple task using jQuery, this code works, but feels bloated and i’m sure theres a quicker way to do it:
menu and close are hidden by default.
$(document).ready(function(){
var menu = $('#menu');
var open = $('.btnOpen');
var close = $('.btnClose');
open.click(function(){
menu.show();
open.hide();
close.show();
});
close.click(function(){
menu.hide();
close.hide();
open.show();
});
});
try: