JSFiddle - React, Tailwind, and code Playground

by Alexander

HTML

<div class="demo-event">
    <a href="http://majorov.su">Majorov.su</a>
</div>

CSS

.orange {
    background: #ffa500;
}

JavaScript

$('a').click(function(event){
	event.preventDefault();
	event.stopPropagation();
	console.log('You have clicked the link.');
});

$('.demo-event').click(function(){
	$(this).toggleClass('orange');
	console.log('You have clicked the DIV.');
});