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

Commit

Permalink
Fixed problem with isVisible when using non-prerendered tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Feb 5, 2011
1 parent 8a7da71 commit 600929e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 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 Feb 4 22:50:03 2011 +0000
* Date: Fri Feb 4 23:09:27 2011 +0000
*/

/* Fluid class for determining actual width in IE */
Expand Down
5 changes: 3 additions & 2 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 Feb 4 22:50:03 2011 +0000
* Date: Fri Feb 4 23:09:27 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 @@ -178,7 +178,7 @@ function QTip(target, options, id, attr)
}

function isVisible() {
return tooltip.css('left') !== hideOffset && tooltip.css('visibility') !== 'hidden';
return tooltip && tooltip.css('left') !== hideOffset && tooltip.css('visibility') !== 'hidden';
}

function setWidget() {
Expand Down Expand Up @@ -678,6 +678,7 @@ function QTip(target, options, id, attr)
// Add ARIA attributes to target
$.attr(target[0], 'aria-describedby', tooltipID);


// Create tooltip element
tooltip = elements.tooltip = $('<div/>')
.attr({
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.pack.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/core.js
Expand Up @@ -137,7 +137,7 @@ function QTip(target, options, id, attr)
}

function isVisible() {
return tooltip.css('left') !== hideOffset && tooltip.css('visibility') !== 'hidden';
return tooltip && tooltip.css('left') !== hideOffset && tooltip.css('visibility') !== 'hidden';
}

function setWidget() {
Expand Down Expand Up @@ -637,6 +637,7 @@ function QTip(target, options, id, attr)
// Add ARIA attributes to target
$.attr(target[0], 'aria-describedby', tooltipID);


// Create tooltip element
tooltip = elements.tooltip = $('<div/>')
.attr({
Expand Down

0 comments on commit 600929e

Please sign in to comment.