JSFiddle - React, Tailwind, and code Playground
by orchid1
HTML
<content>
hello world this is the content divwhich contains a div inside of it here:
<div>this is the content inside the div. and inside this div there is a span tag.<span>I am inside the pan tag</span>
the span tag can be clieck the sclick will also be a click on the content tag and the div tag. I will now attche events to all the elemtents the div and content and the psan tags</div>
</content>
CSS
span{
background-color: grey;
color: #ffffff;
}
JavaScript
jQuery().ready(function () {
$('span').click(function () {
alert('Span has been clicked');
});
$('div').click(function () {
alert('Div has been clicked');
});
$('content').click(function () {
alert('Content tag has been clicked');
});
});