Scip Posted June 15, 2009 Share Posted June 15, 2009 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. 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. Quote Link to comment Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
Scip Posted June 15, 2009 Author Share Posted June 15, 2009 Thanks for the quick reply but if you could point me towards an example that would be fantastic. Quote Link to comment Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 hide/show http://www.astahost.com/info.php/Javascript-Hide-Show-Element-Css_t11957.html innerHTMl http://www.tizag.com/javascriptT/javascript-innerHTML.php Those were all found on google. You can use it too Quote Link to comment Share on other sites More sharing options...
Scip Posted June 15, 2009 Author Share Posted June 15, 2009 fantastic thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.