Използвам tooltipster и имам подсказка, която показва, когато се щракне върху бутон на менюто (това битът работи добре). Все пак имам проблеми със затварянето на подсказката с бутон за затваряне в подсказката.
Сигурно пропускам нещо доста просто.
HTML
<span class="tooltip-email-share"> Stuff </span>
<!-- is triggered by this link -->
<ul>
<...>
<li><a class="menu-share"></a></li>
<...>
</ul>
HTML за подсказка (за всеки случай)
<div class="tt-email-share">
<span class="tt-close"></span>
<h1>Title</h1>
<form>
</form>
</div>
JS
// initiates the tooltip - trigger set to custom & autoClose is false, so it wont close without pressing the close button.
$('.tooltip-email-share').tooltipster({
theme: 'tooltipster-html-shadow',
interactive: 'true',
autoClose: 'false',
position: 'bottom',
speed: '200',
trigger: 'custom',
content: $('HTML Stuff in here')
});
// Shows the tooltip (this bit works a charm)
$('.menu-share').click(function(){
$('.tooltip-email-share').tooltipster('show');
});
// *should* close the tooltip (doesn't work)
$('.tt-close').click(function(){
$('.tooltip-email-share').tooltipster('hide');
});