JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.js"></script>
</head>
<body>
<div id="wrapper">
<a onClick="document.getElementById('innerDiv').height='300px';document.getElementById('innerDiv').innerHTML=new Date();document.getElementById('innerDiv').id='test';">Click</a>
<div id="outerDiv">
<div id="innerDiv">Hello</div>
</div>
<div id="msgDiv"></div>
</div>
</body>
</html>
JavaScript
$.fn.dommodhandler =
function(options)
{
function setListeners()
{
if (this.onpropertychange)
{
$('#innerDiv')
.bind(
'propertychange',
function(e)
{
$('#msgDiv').html(this.id+' changed</br/>');
}
);
}
else if ($.browser.mozilla)
{
$('#msgDiv').html("bind");
$('#innerDiv')
.bind(
'DOMAttrModified',
function(e)
{
$('#msgDiv').html(this.id+' changed</br/>');
}
);
}
else
{
$('#msgDiv').html('not supported in this browser');
return false;
}
}
return setListeners();
};
$.fn.dommodhandler();