From 4c3cc882439c445bd9cda810872902a6da7f870d Mon Sep 17 00:00:00 2001 From: Alex Zhang Date: Fri, 1 Jul 2016 09:58:28 +0800 Subject: [PATCH] fix $.support on using with other jquery extensions. --- src/js/jquery-extend.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/js/jquery-extend.js b/src/js/jquery-extend.js index ae2f6a7..de63d15 100644 --- a/src/js/jquery-extend.js +++ b/src/js/jquery-extend.js @@ -24,11 +24,8 @@ return this; }; - $.support = (function() { - var support = { - touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch) - }; - return support; + $.support.touch = (function() { + return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch); })(); $.touchEvents = {