Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Updated isVisible to be more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Jan 21, 2011
1 parent 9f0bd9d commit c3a6cdc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Fri Jan 21 00:24:52 2011 +0000
* Date: Fri Jan 21 13:30:19 2011 +0000
*/

/* Fluid class for determining actual width in IE */
Expand Down
7 changes: 4 additions & 3 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Fri Jan 21 00:24:52 2011 +0000
* Date: Fri Jan 21 13:30:19 2011 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -209,7 +209,8 @@ function QTip(target, options, id, attr)
}

function isVisible() {
return tooltip.css('left') !== hideOffset;
var t = tooltip[0];
return t && $.css(t, 'left') !== hideOffset && $.css(t, 'visibility') !== 'hidden';
}

function setWidget() {
Expand Down Expand Up @@ -874,7 +875,7 @@ function QTip(target, options, id, attr)
if((typeof state).search('boolean|number')) { state = !visible; }

// Return if element is already in correct state
if(!visible && !state) { return self; }
if(visible === state) { return self; }

// Try to prevent flickering when tooltip overlaps show element
if(event) {
Expand Down

0 comments on commit c3a6cdc

Please sign in to comment.