Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Initiate dropdown onhover instead of onclick

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208166
    Kesiena
    Participant

    Hi,
    I simply want to enable my dropdown list dropdown on hover instead of on click.
    Link: http://codepen.io/anon/pen/OyMQXZ

    #208198
    bearhead
    Participant

    Here is a way you can get a select element to expand on hover with jquery:
    http://codepen.io/kvana/pen/KdVxaZ

    I gave the select box a min-width and overflow:hidden to hide a disabled scroll bar which would have other-wise appeared on hover.

    Also, I would advise you NOT to make select boxes expand on hover. Select boxes are a standard html element and users are generally used to them functioning on click. Having it expand on hover strikes me as poor UX and may not function as expected on some mobile devices.

    #208216
    Kesiena
    Participant

    Thanks all. I understand. This will work just fine

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.