我試圖通過jQuery來顯示文本內容文本
$(function() {
$(".outer").tooltip({
content: "Awesome title!",
position: { my: "left+15 center", at: "right center" },
content: function() {
return $(this).prop('title');
}
});
});
HTML
<p class="outer">
<label for="age">Your age:</label>
<input id="age"
title="<label id='idhere'></label>"/>
</p>
如何顯示 「真棒稱號!」當鼠標懸停在jquery上?
你有2個內容。只需刪除第二個:https://jsfiddle.net/Lqsb6adp/11/ –
是的,但使用第二個內容:https://jsfiddle.net/Lqsb6adp/12/ –