Streaming live at 10am (PST)

Show/hide an element with a Javascript


#1

I'm new to javascript, så this might be very basic, but I hope someone can help.

How to show or hide an element with a Javascript?
Lets say I have a divbox I want to hide if some condition is met?

A related question is how to set a specific tab active (choose a tab) in a tabs element by a javascript?


#2

If somebody else are looking for the same:

I put this in the before body section:

MyTab is a class on a tablink. (probably could also be a class on a button or something else taking a click?). I found the trick to be the document ready function.

Have a look at this post:


#3