callback.apply(scope, arguments);
}
});
}
NodeTouch.prototype.on = function(evt, callback, scope) {
var scopeObj;
var x,y;
if (!scope) {
scopeObj = this._node;
} else {
scopescopeObj = scope;
}
if (evt === ‘tap’) {
tap(this._node,callback,scope);
} else if(evt === ‘longtap’){
longTap(this._node,callback,scope);
} else {
this._node.addEventListener(evt, function() {
callback.apply(scope, arguments);
});
}
return this;
}
window.$ = function(selector) {
var node = document.querySelector(selector);
if (node) {
return new NodeTouch(node);
} else {
return null;









