JSFiddle - React, Tailwind, and code Playground

by TJ VanToll

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<select id="selectmenu" accesskey="a">
    <option>One</option>
    <option>Two</option>
    <option>Three</option>
</select>

CSS

select { width: 200px; }

JavaScript

$.widget( "ui.selectmenu", $.ui.selectmenu, {
    _create: function() {
        this._super();
        this.accesskey = this.element.attr( "accesskey" );
        if ( this.accesskey ) {
            this.button.attr( "accesskey", this.accesskey );
            this.element.removeAttr( "accesskey" );
        }
    },
    _destroy: function() {
        if ( this.accesskey ) {
            this.element.attr( "accesskey", this.accesskey );
        }
        this._super();
    }
});

$( "#selectmenu" ).selectmenu();