Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

hi , how to create a drop down menu using html without clicking anything but by sensing the mouse pointer it display some information .

OpenStudy (farmdawgnation):

So, essentially you want to have a dropdown box that displays its contents when you hover over the box? You can do that fairly easily with jQuery. So, let's assume your dropdown html looks like this. <select class="autodisplay"> <option value="apple">Apple</option> <option value="bacon">Bacon</option> <option value="charlie">Charlie</option> <option value="duck">Duck</option> </select> You can use whatever class attribute you want on the select box and, of course, you'll want to change the option tags to represent your actual options. Then, make sure you include jQuery on the page. (If you need directions on that, I'm sure you can find it.) Then use some Javascript like so: $(".autodisplay") .on("mouseenter", function() { $(event.target).click(); }) .on("mouseleave", function() { $(event.target).click(); }) Essentially, what this code does is says "hey, if I see the mouse enter the space of the drop down box, simulate the user actually clicking on the drop down box." I have made some assumptions here that you understand JavaScript, so if you don't then let me know and I can link you to some tutorials to get you started. :)

OpenStudy (anonymous):

i don't understand javascript i would be hapy to link to some tutorial

OpenStudy (anonymous):

let me give u my email in case i'm not on opentudy

OpenStudy (farmdawgnation):

Boom, just go here : http://www.w3schools.com/js/default.asp

OpenStudy (anonymous):

use the CSS.. using "a hover" condition

OpenStudy (farmdawgnation):

@yoshuajoe a:hover would only apply to anchor tags. If he was talking about a true drop down select box, my solution is what he needs.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!