2
我要顯示工具提示,當我在突出的「類= DIV」內的任何文本。我有以下HTML:我如何得到這部分內容DIV使用jquery
<div class='test'>Test</div>
<div class='tooltip'>Tooltip 1</div>
<div class='test'>Test 2</div>
<div class='tooltip'>Tooltip 2</div>
<div class='test'>Test 4</div>
<div class='tooltip'>Tooltip 4</div>
和下面的JavaScript:
<script type="text/javascript">
$(document).ready(function() {
$('div.test').each(function() {
var tooltipHtml = //NEED to figure out how get the html of the Tooltip div below this current div
$(this).qtip({
content: {
text: tooltipHtml
},
style: { width: 450 }
});
});
});
我要如何從 「下一個」 提示DIV的HTML?
我將問題分爲兩個不同的問題 – leora 2010-08-01 11:54:43
好的,我會刪除那部分。 – 2010-08-01 11:56:06