我正在开发这个"徽标颜色"。我点击后需要工具提示出现在ID为#show
的DIV中(这是正常的)。但是在悬停按钮后,工具提示会出现在任何想要的位置。
在此处访问我的问题:http://web-stranky.org/pro_dementa/
$(document).ready(function () {
$( document ).tooltip( {
content: function() {
return $( this ).attr( "title" );
}
});
$('button').click(function(){
$('#show').html($('#' + $(this).attr('aria-describedby')).children().html());
});
});
答案 0 :(得分:0)
您尚未加入jquery-ui.css
。只需将其添加到文档中,一切都会好的!
您可以从 here
获取<强>更新强>
如果您在div中需要它,html
也添加title
属性,如下所示从其他元素中删除title属性
$('#show').html($('#' + $(this).attr('aria-describedby')).children().html());
$('#show').attr('title',$('#' + $(this).attr('aria-describedby')).children().html()); //add this