Reputation: 3
ok so i got tooltipster to show a tooltip within a tooltip thanks to louisameline, the issue i'm having now is to get each individual line within the first tooltip to have a seperate tooltip of its own heres what i have upto now
$('#test').tooltipster({
content: $('<span id="test1">line one</span><br><span id="test2">line two</span><br><span id="test3">line three</span><br><span id="test4">line four</span>'),
interactive: true,
functionReady: function(origin){
var t = origin.tooltipster('elementTooltip');
$(t).tooltipster({
content: 'second tooltip',
position: 'right'
});
}
});
so each would have its own tooltip but everything i've tried has just broken the script. can anyone help please?
Upvotes: 0
Views: 1746
Reputation: 4904
functionReady: function (origin) {
var t = origin.tooltipster('content');
for (var i = 0; i < t.length; i++) {
$(t[i]).tooltipster({
content: 'tooltip for ' + i +'th content',
position: 'right'
});
}
}
Hope this is what you are looking for...!!!
Upvotes: 1