Skip to content

Commit

Permalink
While loops replace for...of. Bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephband committed Mar 13, 2017
1 parent c8d30f5 commit feacda5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions js/jquery.event.move.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@
types = types.split(rspaces);

var events = getEvents(node);
var handlers, type, i;
var i = types.length;
var handlers, type;

function handler(e) { fn(e, data); }

i = types.length;
while(i--) {
while (i--) {
type = types[i];
handlers = events[type] || (events[type] = []);
handlers.push([fn, handler]);
Expand All @@ -111,12 +111,12 @@
types = types.split(rspaces);

var events = getEvents(node);
var type, handlers, i, k;
var i = types.length;
var type, handlers, k;

if (!events) { return; }

i = types.length;
while(i--) {
while (i--) {
type = types[i];
handlers = events[type];
if (!handlers) { continue; }
Expand Down Expand Up @@ -525,12 +525,14 @@

handleObj.handler = function(e) {
// Copy move properties across from originalEvent
var property, i;
i = properties.length;
var i = properties.length;
var property;

while(i--) {
property = properties[i];
e[property] = e.originalEvent[property];
}

handler.apply(this, arguments);
};
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery.event.move",
"title": "jquery.event.move",
"version": "2.0.0",
"version": "2.0.1",
"author": {
"name": "Stephen Band",
"url": "http://stephband.info",
Expand Down

0 comments on commit feacda5

Please sign in to comment.