JSFiddle - React, Tailwind, and code Playground
by gurvinder372
HTML
<div class="container">
<div class="abc" onclick="alert(this.innerHTML)">ABC</div>
<div class="abc1">ABC</div>
<div class="abc2">abc2</div>
<div class="xys3">xys3</div>
<div class="asd23">asd223</div>
</div>
JavaScript
$( ".abc1" ).bind( "click", function(){
alert( $( this ).html() );
//something else
} );
$( ".abc2" ).bind( "click", function(){
alert( $( this ).html() );
//something else
} );
$( ".xys3" ).bind( "click", function(){
alert( $( this ).html() );
//something else
} );
$( ".asd23" ).bind( "click", function(){
alert( $( this ).html() );
//something else
} );
var html = $( ".container" ).html();
$( ".container" ).html( html );