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" tabindex="2">
    <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._setTabIndex();
    },
    _setTabIndex: function() {
        this.button.attr( "tabindex",
            this.options.disabled ? -1 :
            this.element.attr( "tabindex" ) || 0 );
    },
    _setOption: function( key, value ) {
        this._super( key, value );
        if ( key === "disabled" ) {
            this._setTabIndex();
        }
    }
});

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