JSFiddle - React, Tailwind, and code Playground
JavaScript
$(document).on({
click:function(){
var toggle = $(this).data("toggler", !$(this).data("toggler")).data("toggler");
if(toggle){
console.log('forth');
} else {
console.log('back');
};
}
});