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

Commit

Permalink
Additional fix to tip colour detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Dec 8, 2010
1 parent 064b55c commit 5bedd42
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 45 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: Wed Dec 8 19:03:35 2010 +0000
* Date: Wed Dec 8 19:15:20 2010 +0000
*/

.ui-tooltip-accessible{
Expand Down
9 changes: 5 additions & 4 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: Wed Dec 8 19:03:35 2010 +0000
* Date: Wed Dec 8 19:15:20 2010 +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 @@ -1934,11 +1934,12 @@ function Tip(qTip, command)
precedance = self.corner[ self.corner.precedance ],
borderSide = 'border-' + precedance + '-color',
invalid = /rgba?\(0, 0, 0(, 0)?\)|transparent/i,
elemFill = elems.titlebar.length && corner.y === 'top' ? elems.titlebar : elems.wrapper,
elemBorder = qTip.options.style.widget ? elems.content : elems.wrapper;
isTitleTop = elems.titlebar.length && corner.y === 'top',
elemFill = isTitleTop ? elems.titlebar : elems.wrapper,
elemBorder = isTitleTop ? elems.wrapper : qTip.options.style.widget ? elems.content : elems.wrapper;

// Detect tip colours
color.fill = tip.css('background-color', '').css('border', '').css('background-color') || 'transparent';
color.fill = tip.css({ backgroundColor: '', border: '' }).css('background-color') || 'transparent';
color.border = tip.get(0).style ? tip.get(0).style['border' + precedance.charAt(0) + precedance.substr(1) + 'Color'] : tip.css(borderSide) || 'transparent';

// Make sure colours are valid and reset background and border properties
Expand Down

0 comments on commit 5bedd42

Please sign in to comment.