I want to edit in my code It's html,ccs, javascript code in sharepoint pge. I have a div with class "div" that contains a button that creates a new item when the user clicks on it using javascript function that contains create list item function and I have a table in my code with class"table".
My Javascript code is here for creating new list item:https://ibb.co/m8Xg6hp
I want to make if statement for if the current user was clicked the button before, then no need to show him the div that gives him the button to click again. so, It should show the table in this case.
However when the user doesn't clicked before on the button, it should show the div and after clicking on the button it should hide the div and show the table.
for more clarification please click on this image to see: https://ibb.co/pXp8zzv
How can I reach to this?