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>
<ol id="selectable">
<li class="ui-widget-content">Item 1</li>
<li class="ui-widget-content">Item 2</li>
<li class="ui-widget-content ui-selected">Item 3</li>
</ol>
CSS
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; }
#selectable li { padding: 0.4em; }
JavaScript
$.widget( "ui.selectable", $.ui.selectable, {
_destroy: function() {
this.selectees.removeClass( "ui-selected" );
this._super();
}
});
$( "#selectable" )
.selectable()
.selectable( "destroy" );