JSFiddle - React, Tailwind, and code Playground

HTML

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

<ol id="selectable">
  <li class="ui-widget-content" id="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Blue_morpho_butterfly.jpg/531px-Blue_morpho_butterfly.jpg">Item 1</li>
  <li class="ui-widget-content" id="http://www.potentash.com/wp-content/uploads/2013/03/butterfly.jpg">Item 2</li>
  <li class="ui-widget-content" id="http://smwv.org/wp-content/uploads/2013/11/blue-butterfly2.png">Item 3</li>
  <li class="ui-widget-content">Item 4</li>
  <li class="ui-widget-content">Item 5</li>
  <li class="ui-widget-content">Item 6</li>
  <li class="ui-widget-content">Item 7</li>
</ol>
    
<figure><embed id="chart_image" type="image/jpeg" src="http://smwv.org/wp-content/uploads/2013/11/blue-butterfly2.png"></embed></figure>

CSS

#feedback { font-size: 1.4em; }
  #selectable .ui-selecting { background: #FECA40; }
  #selectable .ui-selected { background: #F39814; color: white; }
  #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
  #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }

JavaScript

$(function() {
    $( "#selectable" ).selectable({
        stop: function() {
            $("#chart_image").attr({
                "src": $( ".ui-selected", this )[0].id
            });
        },
      selecting: function(event, ui) { 
      
        last_selected_value = ui.selecting.value;
        last_selected_id = ui.selecting.id;
                $("#chart_image").attr({
                "src": last_selected_value
            });
          
       }
             

    })
    .children().first().addClass('ui-selected');
});