Skip to content
Advertisement

Problem with showing divs on click with Jquery

if you run my snippet and start clicking around you will be shown div’s like mercedes, boats or houses and that’s perfectly fine but problem is that when you first run this snippet nothing will be shown, you need to click something and that isn’t way to go. How can i make first div visible from the start and then you can mess around with changing divs. note I need to change divs becouse in my actual file there is a content

JavaScript
JavaScript
JavaScript

Advertisement

Answer

You could use JavaScript as mentioned in another answer, or you could use CSS to hide all but the first one.

JavaScript

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