Skip to content

Commit 69929ab

Browse files
Merge pull request digitalBush#200 from sh0dow/patch-1
changes bind/unbind to on/off
2 parents 9237dd3 + 0b67203 commit 69929ab

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/jquery.maskedinput.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ $.fn.extend({
328328
input
329329
.one("unmask", function() {
330330
input
331-
.unbind(".mask")
331+
.off(".mask")
332332
.removeData($.mask.dataName);
333333
})
334-
.bind("focus.mask", function() {
334+
.on("focus.mask", function() {
335335
clearTimeout(caretTimeoutId);
336336
var pos;
337337

@@ -348,10 +348,10 @@ $.fn.extend({
348348
}
349349
}, 10);
350350
})
351-
.bind("blur.mask", blurEvent)
352-
.bind("keydown.mask", keydownEvent)
353-
.bind("keypress.mask", keypressEvent)
354-
.bind(pasteEventName, function() {
351+
.on("blur.mask", blurEvent)
352+
.on("keydown.mask", keydownEvent)
353+
.on("keypress.mask", keypressEvent)
354+
.on(pasteEventName, function() {
355355
setTimeout(function() {
356356
var pos=checkVal(true);
357357
input.caret(pos);
@@ -360,7 +360,7 @@ $.fn.extend({
360360
}, 0);
361361
});
362362
if (chrome && android) {
363-
input.bind("keyup.mask", keypressEvent);
363+
input.on("keyup.mask", keypressEvent);
364364
}
365365
checkVal(); //Perform initial check for existing values
366366
});

0 commit comments

Comments
 (0)