From 0a388ff50bfbecdd671dae57aa462889710fbdeb Mon Sep 17 00:00:00 2001 From: washheart Date: Fri, 13 Jan 2017 09:28:59 +0800 Subject: [PATCH] Allow a function (named "onTouchEnd") call on the end of touch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 检测到中文 英语 专业译文需求,试试百度人工翻译 这样做是为了方便去执行一些其他操作,比如执行一个ajax请求 This is done to facilitate the implementation of some other operations, such as the implementation of a Ajax request --- patternLock.js | 1 + 1 file changed, 1 insertion(+) diff --git a/patternLock.js b/patternLock.js index f2d94f6..b85d401 100644 --- a/patternLock.js +++ b/patternLock.js @@ -86,6 +86,7 @@ }); $(document).one(touchEnd, function() { endHandler.call(this, e, obj); + if(obj.onTouchEnd)obj.onTouchEnd(); }); //set pattern offset var wrap = iObj.holder.find('.patt-wrap'),