1
在鼠标悬停的文本CRM上弹出一个弹出窗口。当我将鼠标悬停在文本上时,文本颜色应该改变 - 悬停时文本的颜色应该变为红色。悬停属性文本不工作
我在下面提供了我的代码。
我把悬停属性给我的班,但它不工作。我如何解决它?
http://jsfiddle.net/a5tjG/3/embedded/result/
.cubeTextStyleCRM:hover {
color: red;
}
$('document').ready(function() {
window.setTimeout(function() {
$('.cubeCellCRM').each(function() {
var htmlText = $(this).attr('data-text');
$(this).append('<div class="cubeTextStyleCRM">' + htmlText + '</div>');
$(this).hover(
function() {
$(".cubeTextStyleCRM").append("<span class='divStock'>Customer Relationship Management</span>");
},
function() {
$(this).find("span:last").remove();
});
});
}, 600);
});
<div class="cubeCellCRM" data-text="CRM" data-caption="
<a style='padding-left: 40px; font-size: 14px; color: grey;' href='#' >Create</a> <div>
<a style='padding-left: 40px; font-size: 14px; color: grey;' href='#' >View/Edit</a> </div>
<a style='padding-left: 40px; font-size: 14px; color: grey;' href='#' >Reports</a>"
data-image="http://intra.defie.co/images/Desktop_icons_02.07.13/CRM.png"></div>
</div>
在HTML中没有'cubeTextStyleCRM'类。 – 2013-03-14 00:46:29
对不起,它来自JS – user2045025 2013-03-14 03:05:58