I successfully added a node, but I forgot to include the hover function of the node in my application. The hover function is not necessary, and I need it to work with ie8 compatibility. Here's my HTML:
<div id="appendCell" style="color:green; color:red">
<button>clickMe</button>
</div>
<div id="addedCell" class="btnStyle" style="display:none">
clickBtn
</div>
This is my CSS:
.btnStyle{
width: 80px;
height: 20px;
background: orange;
}
.btnStyle:hover{
cursor: pointer;
}
Here is my jQuery code:
$("#appendCell").find("button").click(function () { //triggered on click
$(this).before($("#addedCell").html());
});