我想添加一个节点,我成功了,但我没有将该节点的悬停功能复制到我的应用程序。悬停没有任何关系。我想运行与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