@avvio-reply/clickortouch
Advanced tools
Comparing version 1.2.1 to 1.2.2
16
index.js
@@ -22,3 +22,4 @@ /// | ||
"acceptGesturesAsClick": false, | ||
"clearExistingBindings": false | ||
"clearExistingBindings": false, | ||
"clickOnly": false | ||
}, options); | ||
@@ -33,4 +34,8 @@ | ||
if (typeof _options.clearExistingBindings != 'boolean') | ||
_options.clearExistingBindings = false; | ||
_options.clearExistingBindings = false; | ||
if (typeof _options.clickOnly != 'boolean') | ||
_options.clickOnly = false; | ||
var self = this | ||
@@ -88,2 +93,5 @@ | ||
if (_options.clickOnly) | ||
events = click; | ||
if (_options.clearExistingBindings) { | ||
@@ -96,6 +104,6 @@ /** On instantiation, unbind all CT handlers for the selector | ||
$.each(typeCollection, function (j, event) { | ||
if (eventNames.indexOf(event.type) != -1 && | ||
if (event && eventNames.indexOf(event.type) != -1 && | ||
event.selector == selector && | ||
event.handler.name == '__ct_handler') | ||
/** remove all existing ct bindings - jquery each ok with dynamic changes */ | ||
/** remove existing ct binding - jquery each is ok with dynamic collection changes */ | ||
$(document).off(events, selector, event.handler); | ||
@@ -102,0 +110,0 @@ }); |
{ | ||
"name": "@avvio-reply/clickortouch", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Module to simplify handling of click or touch events between browsers and tablet/mobile. Includes lock/release feature.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4308
91