Function that will toggle the click on outside to close the sidebar.
The id of the Sidebar element
Whether a click outside the sidebar closes it
the API response envelope as a JSON string: { code, isSuccess, message, value? }
{ code, isSuccess, message, value? }
Function that will toggle the click on outside to close the sidebar.