Skip to content

Commit

Permalink
remove depreciated $.browser
Browse files Browse the repository at this point in the history
  • Loading branch information
waymondo committed Jun 20, 2013
1 parent 35b9863 commit f83cee6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vendor/assets/javascripts/chosen.jquery.coffee
Expand Up @@ -4,11 +4,15 @@ Copyright (c) 2011 by Harvest
###
root = this
$ = jQuery
isIE6or7 = ->
msVersion = navigator.userAgent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/)
msie = !!msVersion
msie && parseFloat(msVersion[1]) < 8

$.fn.extend({
chosen: (options) ->
# Do no harm and return as soon as possible for unsupported browsers, namely IE6 and IE7
return this if $.browser.msie and ($.browser.version is "6.0" or $.browser.version is "7.0")
return this if isIE6or7()
this.each((input_field) ->
$this = $ this
$this.data('chosen', new Chosen(this, options)) unless $this.hasClass "chzn-done"
Expand Down

0 comments on commit f83cee6

Please sign in to comment.