スタックオーバーフローを検索しているときに、私も直面している古い問題を見つけましたが、誰もそれに答えませんでした。だから、誰かがそれについて何か考えていることを知りたいだけです
新しく作成されたDOM要素に対してjquery Tooltipsterプラグインを機能させるにはどうすればよいですか?
以下は私のコードです
$(document).ready(function() {
$('.test_link').tooltipster({
interactive:true,
content: 'Loading...',
functionBefore: function(origin, continueTooltip) {
continueTooltip();
// next, we want to check if our data has already been cached
//if (origin.data('ajax') !== 'cached') {
$.ajax({
type: 'POST',
url: 'example.php',
success: function(data) {
// update our tooltip content with our returned data and cache it
origin.tooltipster('content', $(data)).data('ajax', 'cached');
}
});
// }
}
});
});