Hide - Show a list of links
-
I want to have a link on my page that could be clicked on one side of the screen and on the other side of the screen an entire set of links appear. I would prefer it is in php or css but html, javascript are fine... What I don't want to do is load the content in a seperate frame/iframe i want to have like 10 categories of links and onmouseover the links inside the category appear, but in a different positioned location on the page. example of what i want it to do: <a href="#buyme" onmouseover="this.className='hide-show-buyme-list'; 'hide-all-other-lists;'">Buy Me</a> <a href="#buyme2" onmouseover="this.className='hide-show-buyme2-list'; hide-all-other-lists;'">Buy Me2</a> <span class="hide-show-variable-or-something1" name="buyme"> <a href="link1.htm">link1</a><br> <a href="link2.htm>link2</a><br> </span> <span class="hide-show-variable-or-something2" name="buyme2"> <a href="link3.htm">link1</a><br> <a href="link4.htm>link2</a><br> </span> as far as i know this should be a basic and easy thing to do with a variable and php or even positioning on css, i just haven't gottent it to work right. The structure doesn't have to match mine at all, just needs to get the job done. Thanks in advance.
-
Answer:
Greetings trimidium-ga, What a great question for me, I just had to overcome this obstacle the other day for a client's site I was designing. I came across a script from Dynamic Drive <http://www.dynamicdrive.com/> that will do exactly what you're wanting. It's called the "Switch Content Script", is compatible with all versions of Internet Explorer 4 and above, as well as Netscape 6. This script utilizes a javascript placed in the <head> section of your webpage, and then uses the following structure in the page: BEGIN CODE ============================== <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursor:pointer">What is JavaScript?</h3> <div id="sc1" class="switchcontent"> JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer. </div> <h3 onClick="expandcontent('sc2')" style="cursor:hand; cursor:pointer">Difference betwen Java & JavaScript?</h3> <div id="sc2" class="switchcontent"> Java is completely different from JavaScript- the former is a compiled language while the later is a scripting language. </div> ============================== END CODE The 'hidden' content does not necessarily have to follow the 'onClick' element, and of course the 'onClick' element can be assigned to an HTML anchor element (ie: <a href="#" onClick="expandcontent('sc2')"> ) You can view an example and all the source files on Dynamic Drive, here: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm Also, if you need specialized help customizing the script, you can find help for Dynamic Drive scripts here: http://codingforums.com/forumdisplay.php?s=&forumid=14 Best of luck, mosquitohawk-ga
trimidium-ga at Google Answers Visit the source
Related Q & A:
- Is there a tool where you give a list of things and it returns related words?Best solution by Web Applications
- How to make a list with only images?Best solution by Super User
- How to add a list to the existing list jQuery?Best solution by designchemical.com
- How can I remove a contact from a list in my address book?Best solution by windows.microsoft.com
- What are a list of good things for a survival pack/bag/kit?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.