Skip to content

Commit 7bc63dd

Browse files
committed
Get rid of 2 useless jQuery.delegate event handler
1 parent 3387853 commit 7bc63dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
});
166166
}
167167

168-
$document.delegate("body", "mousemove", function (e) {
168+
$document.bind("mousemove", function (e) {
169169
lastMousePosition = {x: e.pageX, y: e.pageY};
170170
});
171171

@@ -497,7 +497,7 @@
497497
* also takes care of clicks on label tags that point to the source element
498498
*/
499499
$document.ready(function () {
500-
$document.delegate("body", "mousedown touchend", function (e) {
500+
$document.bind("mousedown touchend", function (e) {
501501
var target = $(e.target).closest("div.select2-container").get(0), attr;
502502
if (target) {
503503
$document.find("div.select2-container-active").each(function () {

0 commit comments

Comments
 (0)