我正在使用工具提示器,并有一个工具提示,显示单击菜单按钮时(此位工作正常).我在使用工具提示中的关闭按钮关闭工具提示时遇到问题.
我必须错过一些非常简单的事情.
HTML
<span class="tooltip-email-share"> Stuff </span>
<!-- is triggered by this link -->
<ul>
<...>
<li><a class="menu-share"></a></li>
<...>
</ul>
Run Code Online (Sandbox Code Playgroud)
工具提示的HTML(以防万一)
<div class="tt-email-share">
<span class="tt-close"></span>
<h1>Title</h1>
<form>
</form>
</div>
Run Code Online (Sandbox Code Playgroud)
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 …Run Code Online (Sandbox Code Playgroud)