JSFiddle - React, Tailwind, and code Playground

HTML

<div>
  <div>
    <input type="checkbox" id="toggle"/><label for="toggle">Toggle</label>
    <button id="select">Select an action</button>
  </div>
  <ul>
    <li><a href="#">Open...</a></li>
    <li><a href="#">Save</a></li>
    <li><a href="#">Delete</a></li>
  </ul>
</div>

CSS

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

JavaScript

$(function () {
          $("#toggle").button();
          $("#select").button({
                  text: false,
                  icons: {
                      primary: "ui-icon-triangle-1-s"
                  }
              })
              .click(function () {
                  var menu = $(this).parent().next().show().position({
                      my: "left top",
                      at: "left bottom",
                      of: this
                  });
                  $(document).one("click", function () {
                      menu.hide();
                  });
                  return false;
              })
              .parent()
                .buttonset()
                .next()
                  .hide()
                  .menu();
      });