diff --git a/dist/jquery.qtip.css b/dist/jquery.qtip.css index f4b6b0da..2c365c1a 100644 --- a/dist/jquery.qtip.css +++ b/dist/jquery.qtip.css @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Sun Dec 12 01:43:24 2010 +0000 +* Date: Sun Dec 12 02:01:38 2010 +0000 */ .ui-tooltip-accessible{ diff --git a/dist/jquery.qtip.js b/dist/jquery.qtip.js index fde4353d..8ca1056f 100644 --- a/dist/jquery.qtip.js +++ b/dist/jquery.qtip.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Sun Dec 12 01:43:24 2010 +0000 +* Date: Sun Dec 12 02:01:38 2010 +0000 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ @@ -828,10 +828,23 @@ function QTip(target, options, id) visible = tooltip.is(':visible'), callback, ieStyle; - // Detect state if valid one isn't provided if((typeof state).search('boolean|number')) { state = !tooltip.is(':visible'); } + // Return if element is already in correct state + if((!visible && !state) || tooltip.is(':animated')) { return self; } + + // Try to prevent flickering when tooltip overlaps show element + if(event) { + if((/over|enter/).test(event.type) && (/out|leave/).test(self.cache.event.type) && + event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){ + return self; + } + + // Cache event + self.cache.event = $.extend({}, event); + } + // Define after callback function after() { @@ -856,20 +869,6 @@ function QTip(target, options, id) } } - // Return if element is already in correct state - if((!visible && !state) || tooltip.is(':animated')) { return self; } - - // Try to prevent flickering when tooltip overlaps show element - if(event) { - if((/over|enter/).test(event.type) && (/out|leave/).test(self.cache.event.type) && - event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){ - return self; - } - - // Cache event - self.cache.event = $.extend({}, event); - } - // Call API methods callback = $.Event('tooltip'+type); callback.originalEvent = event ? self.cache.event : NULL; diff --git a/dist/jquery.qtip.min.js b/dist/jquery.qtip.min.js index 39e6fe15..80f642db 100644 --- a/dist/jquery.qtip.min.js +++ b/dist/jquery.qtip.min.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Sun Dec 12 01:43:24 2010 +0000 +* Date: Sun Dec 12 02:01:38 2010 +0000 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ diff --git a/dist/jquery.qtip.pack.js b/dist/jquery.qtip.pack.js index aa7b047a..05f1f714 100644 --- a/dist/jquery.qtip.pack.js +++ b/dist/jquery.qtip.pack.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Sun Dec 12 01:43:24 2010 +0000 +* Date: Sun Dec 12 02:01:38 2010 +0000 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ diff --git a/src/core.js b/src/core.js index 0fdff5f5..07df8f38 100644 --- a/src/core.js +++ b/src/core.js @@ -803,10 +803,23 @@ function QTip(target, options, id) visible = tooltip.is(':visible'), callback, ieStyle; - // Detect state if valid one isn't provided if((typeof state).search('boolean|number')) { state = !tooltip.is(':visible'); } + // Return if element is already in correct state + if((!visible && !state) || tooltip.is(':animated')) { return self; } + + // Try to prevent flickering when tooltip overlaps show element + if(event) { + if((/over|enter/).test(event.type) && (/out|leave/).test(self.cache.event.type) && + event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){ + return self; + } + + // Cache event + self.cache.event = $.extend({}, event); + } + // Define after callback function after() { @@ -831,20 +844,6 @@ function QTip(target, options, id) } } - // Return if element is already in correct state - if((!visible && !state) || tooltip.is(':animated')) { return self; } - - // Try to prevent flickering when tooltip overlaps show element - if(event) { - if((/over|enter/).test(event.type) && (/out|leave/).test(self.cache.event.type) && - event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){ - return self; - } - - // Cache event - self.cache.event = $.extend({}, event); - } - // Call API methods callback = $.Event('tooltip'+type); callback.originalEvent = event ? self.cache.event : NULL;