Skip to content

Commit

Permalink
attempt to fix some tooltips getting stuck by allowing the hide on cl…
Browse files Browse the repository at this point in the history
…ick function to run for all types (as long as close_on_outside_click is true)
  • Loading branch information
HTMLGuyLLC committed Jul 9, 2019
1 parent bc2c346 commit f3aa73d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h4>All options can be set with data attributes:</h4>
</div>

<!-- jQuery and script -->
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script src="jTippy.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
Expand Down
8 changes: 4 additions & 4 deletions jTippy.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@
const target = $(e.target);
if( !target.hasClass('jtippy') && !target.parents('.jtippy:first').length )
{
$.each($.jTippy.visible, function(index, helper){
if( typeof helper !== 'undefined' ) {
if (helper.trigger === 'click' && helper.close_on_outside_click) {
helper.hide();
$.each($.jTippy.visible, function(index, jTippy){
if( typeof jTippy !== 'undefined' ) {
if (jTippy.close_on_outside_click) {
jTippy.hide();
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion jTippy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jtippy",
"version": "1.3.96",
"version": "1.4.0",
"description": "jQuery tooltip plugin",
"repository": {
"type": "git",
Expand Down

0 comments on commit f3aa73d

Please sign in to comment.