Permalink
Browse files

We don't need those stinkin' properties

  • Loading branch information...
1 parent 64fd5f2 commit a5e9c40a6452e5e73dae4ef30187bc7138778cdb @Trott Trott committed Aug 6, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 LightningTouch.js
View
@@ -147,7 +147,7 @@
};
init = function () {
- var anchors, i;
+ var anchors, i, touchHandler, popHandler;
defaultTargetId = document.body.getAttribute('data-default-target-id') || '';
@@ -175,7 +175,7 @@
return;
}
- this.touchHandler = function (event) {
+ touchHandler = function (event) {
var targetId, target, clickedNode, clickedNodeId, state, hide;
targetId = this.element.getAttribute("data-target-id");
target = document.getElementById(targetId);
@@ -212,10 +212,11 @@
anchors = document.getElementsByTagName("a");
for (i = 0; i < anchors.length; i += 1) {
if (anchors[i].getAttribute('data-target-id') !== null) {
- link.push(new LightningTouch(anchors[i], this.touchHandler));
+ link.push(new LightningTouch(anchors[i], touchHandler));
}
}
- this.popHandler = function (event) {
+
+ popHandler = function (event) {
var state, previousState, hide;
state = getState();
if (state) {
@@ -236,7 +237,7 @@
showContent(event.state.show, event.state.hide);
}
};
- window.addEventListener("popstate", this.popHandler, false);
+ window.addEventListener("popstate", popHandler, false);
};
if (document.readyState === "complete" || document.readyState === "interactive") {

0 comments on commit a5e9c40

Please sign in to comment.