Equivalent of .show() - jQuery in plain JavaScript

Viewed 7938

Anyone has any idea whats the equivalent of.show() of jquery in javascript?

I have tried using document.getElementById and add / remove class that I named "show" // "hide" but that doesn't work very well I might have wrong attributes in those classes I am not sure..

the show class is :

.show{
    position:relative;
    display:block;
}

and the hide class is:

.hide{
    position:absolute;
    top:0px;
    right:0px;
    display:none;
}

I am pretty sure there is a better way of going so.

5 Answers
Related