JSFiddle - React, Tailwind, and code Playground

by Marventus

HTML

<ul>
    <li class="clickable">
        <h2><a href="http://www.elblawg.com">Travel</a></h2>
        <p>Content</p>
    </li>
</ul>

CSS

.clickable{
    background:#ccf;
    cursor:pointer;
}
h2 a{
    background:#fcc;
}

JavaScript

// Code
$(function() {
   $('li.clickable').click(function() {
      window.location.href = $('a', this).attr('href');
      return false;
   });
});