Fixed jQuery check for IE6 and 7.

js_style_fix
Adam Ford 2011-09-02 13:09:32 -06:00
parent 6193bd54de
commit 4b9a5c68a5
3 changed files with 6 additions and 5 deletions

View File

@ -11,13 +11,14 @@
/*
Chosen source: generate output using 'cake build'
Copyright (c) 2011 by Harvest
*/ var $, Chosen, get_side_border_padding, root;
*/
var $, Chosen, get_side_border_padding, root;
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
root = this;
$ = jQuery;
$.fn.extend({
chosen: function(data, options) {
if ($.browser === "msie" && ($.browser.version === "6.0" || $.browser.version === "7.0")) {
if ($.browser.msie && ($.browser.version === "6.0" || $.browser.version === "7.0")) {
return this;
}
return $(this).each(function(input_field) {

File diff suppressed because one or more lines are too long

View File

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