0

it is possible to open drop down list without mouse click and using pure JavaScript ?

2
  • 1
    Typically you want to include some example code of what you've tried and what isn't working. In the future, make sure you've given it a good-faith effort before asking a question. :) Commented Nov 17, 2013 at 18:30
  • 1
    Could you specify whether you mean a <select> or a dropdown menu for navigation links? Commented Nov 17, 2013 at 18:35

2 Answers 2

1

This is assuming you mean a dropdown nav menu, not a <select>.

 <ul> <li><a>hover here</a> <ul> <li>Link 1</li> <li>Link 2</li> <li>Link 3</li> <li>Link 4</li> </ul> </li> </ul> 

css:

ul li ul { display: none; } ul li:hover ul { display: block; } 

Live demo here (click).

Sign up to request clarification or add additional context in comments.

4 Comments

How is an unordered list a drop-down list?
@Joe Simmons, this is a common way to make "drop-down lists" using CSS, particularly for things like nav bars.
Does he mean "select". That question is terribly unclear, then. Dropdown menu's are made with lists (ul li) so...why shouldn't I expect this to be a good answer?
Ah, I see now that you edited the code. Not bad.
0

Sorry, but is not possible. Best thing you could get is select a option from the list.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.