Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Don't use bind for browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvillar committed Jul 10, 2014
1 parent a0f62cd commit 81ff148
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/jquery.mobilePhoneNumber.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ mobilePhoneNumber = {}
mobilePhoneNumber.init = (options = {}) ->
unless @data('mobilePhoneNumberInited')
@data('mobilePhoneNumberInited', true)
@bind('keypress', restrictEventAndFormat_.bind($(@)))
@bind('keyup', formatUp_.bind($(@)))
@bind('keydown', formatBack_.bind($(@)))
@bind 'keypress', =>
restrictEventAndFormat_.apply($(@), arguments)
@bind 'keyup', =>
formatUp_.apply($(@), arguments)
@bind 'keydown', =>
formatBack_.apply($(@), arguments)

@data('allowPhoneWithoutPrefix', options.allowPhoneWithoutPrefix)

Expand Down

0 comments on commit 81ff148

Please sign in to comment.