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"><a href="http://google.com">Item 1</a></li>
    <li class="ui-widget-content">Item 2</li>
    <li class="ui-widget-content">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

$( "#selectable" ).selectable({
    cancel: ""
});

$( document ).on( "keydown", function( event ) {
    if ( event.keyCode == 18 ) {
        $( "#selectable" ).selectable( "option", "cancel", "a" );
    }
});
$( document ).on( "keyup", function( event ) {
    $( "#selectable" ).selectable( "option", "cancel", "" );
});