Skip to content

Commit

Permalink
Get rid of 2 useless jQuery.delegate event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Sep 12, 2012
1 parent 3387853 commit 7bc63dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions select2.js
Expand Up @@ -165,7 +165,7 @@
}); });
} }


$document.delegate("body", "mousemove", function (e) { $document.bind("mousemove", function (e) {
lastMousePosition = {x: e.pageX, y: e.pageY}; lastMousePosition = {x: e.pageX, y: e.pageY};
}); });


Expand Down Expand Up @@ -497,7 +497,7 @@
* also takes care of clicks on label tags that point to the source element * also takes care of clicks on label tags that point to the source element
*/ */
$document.ready(function () { $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; var target = $(e.target).closest("div.select2-container").get(0), attr;
if (target) { if (target) {
$document.find("div.select2-container-active").each(function () { $document.find("div.select2-container-active").each(function () {
Expand Down

0 comments on commit 7bc63dd

Please sign in to comment.