add js to close sidebar on main click