From 7bc63dd26447f11458ea047c5f663265d241a22a Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 12 Sep 2012 14:57:35 -0400 Subject: [PATCH] Get rid of 2 useless jQuery.delegate event handler --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 4f7ff4c6..caa8660f 100644 --- a/select2.js +++ b/select2.js @@ -165,7 +165,7 @@ }); } - $document.delegate("body", "mousemove", function (e) { + $document.bind("mousemove", function (e) { lastMousePosition = {x: e.pageX, y: e.pageY}; }); @@ -497,7 +497,7 @@ * also takes care of clicks on label tags that point to the source element */ $document.ready(function () { - $document.delegate("body", "mousedown touchend", function (e) { + $document.bind("mousedown touchend", function (e) { var target = $(e.target).closest("div.select2-container").get(0), attr; if (target) { $document.find("div.select2-container-active").each(function () {