diff --git a/dist/js/hoverIntent.js b/dist/js/hoverIntent.js index cbe3ae7..0d3d108 100644 --- a/dist/js/hoverIntent.js +++ b/dist/js/hoverIntent.js @@ -40,7 +40,7 @@ if ( typeof handlerIn === "object" ) { cfg = $.extend(cfg, handlerIn ); - } else if ($.isFunction(handlerOut)) { + } else if ( typeof handlerOut === "function" ) { cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); } else { cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); @@ -111,4 +111,4 @@ // listen for mouseenter and mouseleave return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/src/js/hoverIntent.js b/src/js/hoverIntent.js index cbe3ae7..0d3d108 100644 --- a/src/js/hoverIntent.js +++ b/src/js/hoverIntent.js @@ -40,7 +40,7 @@ if ( typeof handlerIn === "object" ) { cfg = $.extend(cfg, handlerIn ); - } else if ($.isFunction(handlerOut)) { + } else if ( typeof handlerOut === "function" ) { cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); } else { cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); @@ -111,4 +111,4 @@ // listen for mouseenter and mouseleave return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); }; -})(jQuery); \ No newline at end of file +})(jQuery);