Skip to content
Advertisement

Revert back styles in HTML

So I have this css code to define a <div class='mc-menu' id ='menu'>

JavaScript

I have this function that does document.getElementById('menu').style.display = 'none'; This resets the styling for this menu. Is it possible to create the CSS using a javascript function

JavaScript

doesn’t work. If someone can try and help me make it so that I can use javascript to represent that CSS, it would be greatly appreciated.

EDIT: Full Code Here: https://paste.pythondiscord.com/ijuluwuzab.xml

Advertisement

Answer

if you want hide particular div using JavaScript,

JavaScript

then if you want that display that div again

JavaScript

& you can use also this for hide perticular div

JavaScript

then for display again

JavaScript

Thank You…

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement