0
悬停功能适用于显示警报.... 但我无法显示追加与跨度标签的文本.... 不知道什么发生的事情与它... 提供下面我的代码.....悬停功能工作警报但不能追加跨度标签
$('document').ready(function() {
window.setTimeout(function() {
$('.cubeCell').each(function() {
var htmlText = $(this).attr('data-text');
$(this).append('<div class="cubeTextStyle">' + htmlText + '</div>');
$(this).hover(
function() {
//alert("123");
$(this).append($("<span> ***</span>"));
},
function() {
$(this).find("span:last").remove();
});
});
}, 600);
});
<div class="cubeCell"
data-text="hover here"
class="desktopContactImage cubeCell"
data-caption="<a style='padding-left: 40px; font-size: 14px; color: grey;' href='/Inventory/Partnumber/?ps=list' >Register</a> <div> <a style='padding-left: 40px; font-size: 14px; color: grey;' href='/Bom/Bom/?ps=list' >Demo</a> </div> <a style='padding-left: 40px; font-size: 14px; color: grey;' >Reports</a>"
data-image="http://intra.defie.co/images/Desktop_icons_02.07.13/guest.png"
></div>
请点击TidyUp按钮并按照说明清理您的小提琴。一团糟。 – isherwood 2013-03-13 01:33:56
它附加***范围。在IE 8中检查它。我甚至没有看到Chrome中的悬停文本。你使用什么浏览器? – hop 2013-03-13 01:37:00
我使用的是Chrome浏览器 – user2045025 2013-03-13 01:46:32