-1

I have one drop-down with ul and li tag. It is working on click. I'm trying to open drop-down on mouse hover not a click. How can i achieve this.

<div class="ms-parent form-control">
    <button type="button">
        <span class="placeholder">Choose Anyone</span>
    </button>

    <div class="ms-drop bottom" style="display: none;">
        <ul>
            <li class="ms-select-all">
            <li>
            <label>
                <input type="checkbox" value="Abu Dhabi" undefined="">
                Computer
            </label>
            </li>
            <li>
            <label>
                <input type="checkbox" value="Al Ain" undefined="">
                Keyboard
            </label>
            </li>
            <li>
        </ul>
    </div>
</div>

The output is like normal html select drop-down. But i am looking to open dropdown on mouse hover event.

  • use hover function of jquery – Mahender Singh Jan 08 '15 at 13:48
  • @MahenderSingh Including jQuery for this reason alone would be superfluous. This can be accomplished using CSS `:hover`... – War10ck Jan 08 '15 at 13:53
  • I believe you're current markup is invalid. I don't believe you can nest an `
  • ` element directly within another `
  • ` element. You can nest a new unordered list `
      ` and then new `
    • ` element's in that list however...
  • – War10ck Jan 08 '15 at 13:55
  • There are lots and lots of tutorials out there for such functionalities. Have you checked them? If yes, provide the references or snippets. Then, mention where you have stucked and ask for help from community. – Bhavik Shah Jan 08 '15 at 13:56
  • Duplicate question - http://stackoverflow.com/questions/4599975/html-select-box-options-on-hover – Rob Scott Jan 08 '15 at 13:57
  • possible duplicate of [jQuery Dropdown Menu Question](http://stackoverflow.com/questions/3736238/jquery-dropdown-menu-question) – Bhavik Shah Jan 08 '15 at 13:57