1
私はjqueryの初心者です。この質問はjqueryよりもjavascriptに関連しています。どんな助けもありがとうございます。jquery tooltipsterプラグインが動作しない
私はTooltipster Pluginを使用して、データテーブルの<td>
要素の上にカーソルを置くたびにツールチップを作成しています。これを行うために、私はデータテーブル内の各行をループし、子ノードを使用して<td>
要素を選択し、.tooltipster()関数を適用しました。ただし、ツールチップは1行目の<td>
要素に対してのみ機能します。どのようにすべての行のためにそれを働かせるか考えていますか?
$('#mytable tbody tr').each(function(){
//childNode[7] is the <td> element on which i want the tooltip
$(this.childNodes[7]).tooltipster({
animation: 'fade',
delay: 200,
theme: 'tooltipster-punk',
trigger: 'hover',
interactive: 'true',
functionBefore : function drawChart() {
// This isnt needed to understand the problem so i have not pasted the code
}
});
});
表データ
<td class="tooltip" data-tooltip-content="#chart_div" style="padding-left:40px" id="storage" >
<img src="@Url.Content("~/Content/images/database.png")" />
</td>
小さなテキストをツールチップとして使用した場合は、ツールチップの代わりに "title"を使用すると、より簡単で簡単になります。 –
なぜこの質問をもう一度聞いたのですか?私は他の人に答えました。 –