テーブル内のセルのツールチップを実装しています。ターゲットのdata-message
属性を取得する必要があります。jQueryツール:ツールチップ、jQueryの「this」属性への参照
$("#pricing_plans_table .sku_tooltip").tooltip({
// each trashcan image works as a trigger
tip: '#' + $(this).attr('data-message'),
// move tooltip a little bit to the right
offset: [0, 15],
// there is no delay when the mouse is moved away from the trigger
delay: 0
});
これは機能しません。私は「[オブジェクトオブジェクト]のツールチップを見つけることができません」というメッセージが表示されます...ターゲットを正しく参照する方法がわかりません。
これはすべて正しく見えますが、私たちはhtmlも見ることができますか? –
console.log '$(this).attr( 'data-message')' – CamelCamelCamel