Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

I am new to stackoverflow with a coding question. How do you create a button that is click able and becomes a list that looks like a div? The only example I can think of that people do this is in forum signatures. Like click to show content. Thanks for all of your help. I would also like the know how to create a clickable button that opens up a program, or that starts to ask you questions. I know the console.log(); . I want it to be like a button that when clicked starts an coded program. Using console.log();. Thanks for everyones help, I am fairly new at coding and have already learned HTML, CSS, and now JavaScript using CodeAcademy but they dont teach you the drop down button.

share|improve this question
1  
Show your efforts.Don't post the question as an order – Ankit Jun 14 '13 at 15:08
    
if you show us some of the things you've tried , it will help you to get some answers :) – GCyrillus Jun 14 '13 at 15:09
    
A dropdown menu is created by using the <select> element. – ZippyV Jun 14 '13 at 15:10
    
Thanks for the info guys I am sorry this is my first time using stack overflow. @ GCyrillus I have tried the <div> but obiously that isnt the right one that only creates the box. – sudoBacon Jun 15 '13 at 15:46

1 Answer 1

The way this is usually done is that there's a hidden div (with the dropdown content) when the link/button is clicked the JavaScript code catches it and then the div is shown.

What you can also do of course is working with CSS hovers.

Good luck!

share|improve this answer
    
yes this is what I want to do. I want to be able to make a dropdown content box. Also how do you make a button that opens a program using console.log();? – sudoBacon Jun 15 '13 at 15:48
    
You can't. Console.log() is used to output a piece of text in the console, nothing more. – user2019515 Jun 15 '13 at 23:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.