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

Commit

Permalink
If unfocus is used as the hide.event, make sure hoverIntent still fun…
Browse files Browse the repository at this point in the history
…ctions by using mouseleave for it
  • Loading branch information
Craga89 committed Mar 30, 2011
1 parent 410d48c commit 2f11eb5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 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: Mon Mar 28 16:03:26 2011 +0100
* Date: Wed Mar 30 21:38:20 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down
8 changes: 7 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: Mon Mar 28 16:03:26 2011 +0100
* Date: Wed Mar 30 21:38:20 2011 +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 @@ -1452,6 +1452,12 @@ QTIP.bind = function(opts, event)
show: $.trim('' + options.show.event).replace(/ /g, namespace+' ') + namespace,
hide: $.trim('' + options.hide.event).replace(/ /g, namespace+' ') + namespace
};

/*
* If hide event is just 'unfocus', we'll use mouseleave as the hide event...
* since unfocus is actually library specific and won't fire as an event anywho.
*/
if(options.hide.event === 'unfocus') { events.hide = 'mouseleave' + namespace; }

// Define hoverIntent function
function hoverIntent(event) {
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.

6 changes: 6 additions & 0 deletions src/core.js
Expand Up @@ -1410,6 +1410,12 @@ QTIP.bind = function(opts, event)
show: $.trim('' + options.show.event).replace(/ /g, namespace+' ') + namespace,
hide: $.trim('' + options.hide.event).replace(/ /g, namespace+' ') + namespace
};

/*
* If hide event is just 'unfocus', we'll use mouseleave as the hide event...
* since unfocus is actually library specific and won't fire as an event anywho.
*/
if(options.hide.event === 'unfocus') { events.hide = 'mouseleave' + namespace; }

// Define hoverIntent function
function hoverIntent(event) {
Expand Down

0 comments on commit 2f11eb5

Please sign in to comment.