Reputation: 173
Tooltipster tooltip not opening on clicking the span element
Please, see the code below the one that I have tried.
Html Code
<ul>
<li>Item 1<span class="tooltipp" data-tooltip-content="#tooltip_content_1">tooltip</span>
</li>
<li>Item 1<span class="tooltipp" data-tooltip-content="#tooltip_content_2">tooltip</span>
</li>
</ul>
<div class="tooltip_templates" style="display:none;">
<span id="tooltip_content_1">Tooltip 1</span>
<span id="tooltip_content_2">Tooltip 2</span>
</div>
JS code
jQuery('.tooltipp').tooltipster({
theme: 'tooltipster-shadow',
contentCloning: true,
trigger: 'click',
});
After creating a codepen for the same, tooltip is popping up there but not the content. Content is undefined
.
Codepen: https://codepen.io/himani3010/pen/gyRyzj
Upvotes: 0
Views: 366