|
|
|
|
|
by drinchev
3107 days ago
|
|
In this specific case jQuery's `show` is just giving you a shortcut to show/hide arbitrary elements. Try doing this with CSS, please. <div class="element"></div>
.element { display: block; }
.element.is-hidden { display: none; }
document.getElementsByClassName("element")[0].classList.add( "is-hidden" );
You should never ask yourself "How can I accomplish that without jQuery", but rather "What would be the best way to do it!" |
|