Skip to content
Advertisement

make a div show on page load

JavaScript
JavaScript
JavaScript

This is a navigation toggler that toggles between showing different divs id=(home, profile,deposit,withdrawal).

I need the div id=home to show by default immediately the page loads.

Advertisement

Answer

I made a function that takes one String argument. Hiding all divs, and after then set the display of the first div that the id is equal the given string. At initialization the given string is home.

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