JSFiddle - React, Tailwind, and code Playground
by santosh joshi
HTML
<div id="appendme">test</div>
<button>app</button>
JavaScript
jQuery.fn.append=function() {
return this.domManip(arguments, true, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 ) {
this.appendChild( elem );
$(elem).trigger('appended');
}
});
};
$('button').click(function() {
$('#appendme').append($('<div class="inner">').text(Math.random()));
})
$('#appendme').on('appended',function() {
console.log(this);
});