Я использую 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');
});