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($("", { text: value, value: value }));
@@ -1972,7 +1972,7 @@
var self = this;
- data = $.isFunction(data) ? data.call() : data;
+ data = (typeof data === "function") ? data.call() : data;
if(self.isDeferred(data)) {
@@ -2289,7 +2289,7 @@ selectBoxIt._destroySelectBoxIt = function() {
selectBoxIt.disableOption = function(index, callback) {
- var self = this, currentSelectBoxOption, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
+ var self = this, currentSelectBoxOption, hasNextEnabled, hasPreviousEnabled, type = typeof index;
// If an index is passed to target an indropdownidual drop down option
if(type === "number") {
@@ -2391,7 +2391,7 @@ selectBoxIt._destroySelectBoxIt = function() {
var openDownClassName = 'selectboxit-open-down';
// If the `size` option is a number
- if($.type(self.listSize) === "number") {
+ if(typeof self.listSize === "number") {
// Set's the max-height of the drop down list
self.list.css("max-height", self.maxHeight || "none");
@@ -2533,7 +2533,7 @@ selectBoxIt._destroySelectBoxIt = function() {
selectBoxIt.enableOption = function(index, callback) {
- var self = this, currentSelectBoxOption, currentIndex = 0, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
+ var self = this, currentSelectBoxOption, currentIndex = 0, hasNextEnabled, hasPreviousEnabled, type = typeof index;
// If an index is passed to target an indropdownidual drop down option
if(type === "number") {
@@ -2777,7 +2777,7 @@ selectBoxIt._destroySelectBoxIt = function() {
currentText = self.currentText,
// Option for how many characters a user must search to be treated as a full string search
- numSearchCharacters = $.type(options.numSearchCharacters) === 'number' ? options.numSearchCharacters : 3;
+ numSearchCharacters = typeof options.numSearchCharacters === 'number' ? options.numSearchCharacters : 3;
// Loops through the text array to find a pattern match
for (x = currentIndex, arrayLength = textArray.length; x < arrayLength; x += 1) {
@@ -3095,7 +3095,7 @@ selectBoxIt._destroySelectBoxIt = function() {
selectBoxIt.remove = function(indexes, callback) {
var self = this,
- dataType = $.type(indexes),
+ dataType = typeof indexes,
value,
x = 0,
dataLength,
@@ -3111,7 +3111,7 @@ selectBoxIt._destroySelectBoxIt = function() {
value = indexes[x];
// If the currently traversed array item is an object literal
- if($.type(value) === "number") {
+ if(typeof value === "number") {
if(elems.length) {
@@ -3185,7 +3185,7 @@ selectBoxIt._destroySelectBoxIt = function() {
// Stores the plugin context inside of the self variable
var self = this,
- type = $.type(val);
+ type = typeof val;
// Makes sure the passed in position is a number
if(type === "number") {
@@ -3223,7 +3223,7 @@ selectBoxIt._destroySelectBoxIt = function() {
var self = this;
//Makes sure a string is passed in
- if($.type(key) === "string") {
+ if(typeof key === "string") {
// Sets the plugin option to the new value provided by the user
self.options[key] = value;
diff --git a/src/javascripts/modules/jquery.selectBoxIt.add.js b/src/javascripts/modules/jquery.selectBoxIt.add.js
index 2329b33..9a73aa3 100644
--- a/src/javascripts/modules/jquery.selectBoxIt.add.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.add.js
@@ -13,7 +13,7 @@
this._populate(data, function(data) {
var self = this,
- dataType = $.type(data),
+ dataType = typeof data,
value,
x = 0,
dataLength,
@@ -22,7 +22,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)) {
@@ -55,7 +55,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($("", { text: value, value: value }));
@@ -159,7 +159,7 @@
var self = this;
- data = $.isFunction(data) ? data.call() : data;
+ data = (typeof data === "function") ? data.call() : data;
if(self.isDeferred(data)) {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.core.js b/src/javascripts/modules/jquery.selectBoxIt.core.js
index cb0b434..abda5f3 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.core.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.core.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);
diff --git a/src/javascripts/modules/jquery.selectBoxIt.disable.js b/src/javascripts/modules/jquery.selectBoxIt.disable.js
index f694ce1..58849a5 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.disable.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.disable.js
@@ -48,7 +48,7 @@
selectBoxIt.disableOption = function(index, callback) {
- var self = this, currentSelectBoxOption, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
+ var self = this, currentSelectBoxOption, hasNextEnabled, hasPreviousEnabled, type = typeof index;
// If an index is passed to target an indropdownidual drop down option
if(type === "number") {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.dynamicPositioning.js b/src/javascripts/modules/jquery.selectBoxIt.dynamicPositioning.js
index 1f14618..26333f2 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.dynamicPositioning.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.dynamicPositioning.js
@@ -13,7 +13,7 @@
var openDownClassName = 'selectboxit-open-down';
// If the `size` option is a number
- if($.type(self.listSize) === "number") {
+ if(typeof self.listSize === "number") {
// Set's the max-height of the drop down list
self.list.css("max-height", self.maxHeight || "none");
diff --git a/src/javascripts/modules/jquery.selectBoxIt.enable.js b/src/javascripts/modules/jquery.selectBoxIt.enable.js
index 8a5cd46..6f855a7 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.enable.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.enable.js
@@ -45,7 +45,7 @@
selectBoxIt.enableOption = function(index, callback) {
- var self = this, currentSelectBoxOption, currentIndex = 0, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
+ var self = this, currentSelectBoxOption, currentIndex = 0, hasNextEnabled, hasPreviousEnabled, type = typeof index;
// If an index is passed to target an indropdownidual drop down option
if(type === "number") {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.keyboardSearch.js b/src/javascripts/modules/jquery.selectBoxIt.keyboardSearch.js
index 1fa0b44..00159bd 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.keyboardSearch.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.keyboardSearch.js
@@ -70,7 +70,7 @@
currentText = self.currentText,
// Option for how many characters a user must search to be treated as a full string search
- numSearchCharacters = $.type(options.numSearchCharacters) === 'number' ? options.numSearchCharacters : 3;
+ numSearchCharacters = typeof options.numSearchCharacters === 'number' ? options.numSearchCharacters : 3;
// Loops through the text array to find a pattern match
for (x = currentIndex, arrayLength = textArray.length; x < arrayLength; x += 1) {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.remove.js b/src/javascripts/modules/jquery.selectBoxIt.remove.js
index 78d1d23..663aad6 100644
--- a/src/javascripts/modules/jquery.selectBoxIt.remove.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.remove.js
@@ -10,7 +10,7 @@
selectBoxIt.remove = function(indexes, callback) {
var self = this,
- dataType = $.type(indexes),
+ dataType = typeof indexes,
value,
x = 0,
dataLength,
@@ -26,7 +26,7 @@
value = indexes[x];
// If the currently traversed array item is an object literal
- if($.type(value) === "number") {
+ if(typeof value === "number") {
if(elems.length) {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.selectOption.js b/src/javascripts/modules/jquery.selectBoxIt.selectOption.js
index f9a1219..3719520 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.selectOption.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.selectOption.js
@@ -10,7 +10,7 @@
// Stores the plugin context inside of the self variable
var self = this,
- type = $.type(val);
+ type = typeof val;
// Makes sure the passed in position is a number
if(type === "number") {
diff --git a/src/javascripts/modules/jquery.selectBoxIt.setOption.js b/src/javascripts/modules/jquery.selectBoxIt.setOption.js
index cfdf7bc..ba82841 100755
--- a/src/javascripts/modules/jquery.selectBoxIt.setOption.js
+++ b/src/javascripts/modules/jquery.selectBoxIt.setOption.js
@@ -12,7 +12,7 @@
var self = this;
//Makes sure a string is passed in
- if($.type(key) === "string") {
+ if(typeof key === "string") {
// Sets the plugin option to the new value provided by the user
self.options[key] = value;