I'm ammending some very basic content at work & I'm looking to incorporate a few things which I'm finding it quite hard to find online. I'm wanting to have a 'show/hide' option where you select a 'link' on the page & it reveals some content below. Once you select the link again it disappears. How would I go about doing that? Also, when I hover over a certain word I'd like a 'top tip' or an explanation of that word to appear above it, when you move away I want it to disappear. Again, I can't find this online anywhere. If anyone could help that would be fantastic.
The cheats way would be to find a site where you can see the effect you are looking for and then go.. view.. source in explorer or view page source in Firefox and steal the code.
This might help http://www.w3schools.com/dhtml/dhtml_javascript.asp A bit more complicated than static HTML, but i think it might be the only way to do what you are trying to do.
use javascript and hidden iframe I don't how savvy you are with regard to javascript and DHTML.</p> Anyway, if you've got a bit of text and a button/image/link that you click onto revealmore text below, you canoutput to the page a hidden iframecontaining the text you want to display but with the style of visibility:hidden and an iframe id. When you click on the button, inyour onclick method for the button you will get a reference to the iframe by using document.getElementById("yourid" and dynamically changing the style of the iframe from visibility "hidden" to visibility "visible" - in javascript something like document.getElementById("yourid".style.visibility=visible; </p> In the onclick method for the button you will need to check the current style, ie, if it is visible change it to hidden, and vice versa, so the button hides/displays the iframe accordingly.</p> if(document.getElementById("yourid".style = 'hidden') </p> document.getElementById("yourid".style.visibility=visible; // and the otherway around</p> Hope this helps</p> </p>