JSFiddle - React, Tailwind, and code Playground

by rahulsadasivan

HTML

<ul id="tbl_calendar">
  <li>
    <a id="2015-11-30|1112|1">Click</a>
  </li>
</ul>

CSS

.selected {
   color: red; 
}

JavaScript

$(document).ready(function() {
  $("#tbl_calendar").on("click", "a", clickAppointment);

  function clickAppointment(eventData) {
    //Get the Id of the appointment that has been clicked:
    currentAppointment = this.id;
    $(this).addClass("selected");
  }
});