diff --git a/src/javascripts/jquery.selectBoxIt.js b/src/javascripts/jquery.selectBoxIt.js index ebc9764..c2e18fb 100644 --- a/src/javascripts/jquery.selectBoxIt.js +++ b/src/javascripts/jquery.selectBoxIt.js @@ -730,7 +730,7 @@ }); - if($.type(listSize) === "number") { + if(typeof listSize === "number") { // Stores the new `max-height` for later self.maxHeight = self.listAnchors.outerHeight(true) * listSize; @@ -823,7 +823,7 @@ var self = this; // Checks to make sure the parameter passed in is a function - if ($.isFunction(callback)) { + if (typeof callback === "function") { // Calls the method passed in as a parameter and sets the current `SelectBoxIt` object that is stored in the jQuery data method as the context(allows for `this` to reference the SelectBoxIt API Methods in the callback function. The `dropdown` DOM element that acts as the new dropdown list is also passed as the only parameter to the callback callback.call(self, self.dropdown); @@ -1826,7 +1826,7 @@ this._populate(data, function(data) { var self = this, - dataType = $.type(data), + dataType = typeof data, value, x = 0, dataLength, @@ -1835,7 +1835,7 @@ parsedJSON = isJSON && self._parseJSON(data); // If the passed data is a local or JSON array - if(data && (dataType === "array" || (isJSON && parsedJSON.data && $.type(parsedJSON.data) === "array")) || (dataType === "object" && data.data && $.type(data.data) === "array")) { + if(data && (dataType === "array" || (isJSON && parsedJSON.data && (typeof parsedJSON.data === "array"))) || (dataType === "object" && data.data && (typeof data.data === "array"))) { // If the data is JSON if(self._isJSON(data)) { @@ -1868,7 +1868,7 @@ } // If the currently traversed array item is a string - else if($.type(value) === "string") { + else if(typeof value === "string") { // Adds an option to the elems array elems.push($("