【发布时间】:2012-10-30 08:37:44
【问题描述】:
为什么我不能通过上课来设置样式
<div class="ko">add image</div>
$("div").hover(
function () {
$("<div class="ko">add image</div>").click(function() {
$(this).parent().unbind("hover").children("img").attr("src", "http://www.onlinegrocerystore.co.uk/images/goodfood.jpg");
$(this).remove();
}).appendTo(this);
},
function () {
$(this).find("div:last").remove();
}
);
//li with fade class
//$("li.fade").hover(function(){$(this).fadeOut(100);$(this).fadeIn(500);});
【问题讨论】:
-
天啊,乱码。 =/
-
我将鼠标悬停在 img 标签上不起作用 jsfiddle.net/6MmMe/31 是什么原因
-
图片是空的,你不能附加到它们上面。
标签: jquery-ui jquery jquery-plugins jquery-selectors