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

Commit

Permalink
Added check to see if position target is a valid jQuery object to pre…
Browse files Browse the repository at this point in the history
…vent issues
  • Loading branch information
Craga89 committed Oct 3, 2010
1 parent b2353cb commit c7d334c
Show file tree
Hide file tree
Showing 5 changed files with 14 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: Sun Oct 3 17:07:27 2010 +0100
* Date: Sun Oct 3 17:13:31 2010 +0100
*/

.ui-tooltip-accessible{
Expand Down
5 changes: 4 additions & 1 deletion 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: Sun Oct 3 17:07:27 2010 +0100
* Date: Sun Oct 3 17:13:31 2010 +0100
*/

"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 @@ -1058,6 +1058,9 @@ function QTip(target, options, id)
position.top += at.y === 'bottom' ? targetHeight : at.y === 'center' ? targetHeight / 2 : 0;
}

// Return if we can't determine the position targets type
else { return self; }

// Adjust position relative to tooltip
position.left += posOptions.adjust.x + (my.x === 'right' ? -elemWidth : my.x === 'center' ? -elemWidth / 2 : 0);
position.top += posOptions.adjust.y + (my.y === 'bottom' ? -elemHeight : my.y === 'center' ? -elemHeight / 2 : 0);
Expand Down
8 changes: 4 additions & 4 deletions dist/jquery.qtip.min.js

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

0 comments on commit c7d334c

Please sign in to comment.