我想添加一個節點,我成功了,但我沒有將該節點的懸停功能複製到我的應用程序。懸停沒有任何關係。我想運行與ie8。 這是我的html:懸停樣式不適用於複製的HTML
<div id="appendCell" style="color:green; color:red">
<button>clickMe</button>
</div>
<div id="addedCell" class="btnStyle" style="display:none">
clickBtn
</div>
這是我的CSS:
.btnStyle{
width: 80px;
height: 20px;
background: orange;
}
.btnStyle:hover{
cursor: pointer;
}
這是我的jQuery代碼:
$("#appendCell").find("button").click(function() { //當點擊後觸發
$(this).before($("#addedCell").html());
});
不明白你想說什麼。 – 2014-09-04 13:33:52
我添加#addedCell節點成功,但.btnStyle類的懸停功能不運行。我想懸停run.thanks – gww 2014-09-04 13:41:36