Jump to content

How to achieve something like this:


Scip

Recommended Posts

I want to achieve a menu like the one in the following page, where when you click on the take the contents of the box below changes.

 

tabbed_menu.png

 

You can see how it works on this site : http://www.jeremymartin.name/projects.php?project=kwicks

 

I also very new to javascript, i basically read about the syntax and a few functions but i want to something similar to an item basket where when you click on something information about that item will appear in a box on the same thing.

 

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/
Share on other sites

You can do it two ways, create an element/update it's html, or just show/hide various elements.

 

You can use element.style.display = 'block'; to display it, and display = 'none'; to hide it. Just like in CSS.

 

You can also update the parent container's content, like parent.innerHTML = 'new content';.

 

Hope this helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.