diff --git a/src/definitions/behaviors/api.js b/src/definitions/behaviors/api.js index 66a6bd8ccd..09f49dda5e 100644 --- a/src/definitions/behaviors/api.js +++ b/src/definitions/behaviors/api.js @@ -12,9 +12,12 @@ 'use strict'; -$.isWindow = $.isWindow || function(obj) { - return obj != null && obj === obj.window; -}; + function isWindow(obj) { + return obj != null && obj === obj.window; + } + function isFunction(obj) { + return typeof obj === "function" && typeof obj.nodeType !== "number"; + } window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -27,7 +30,7 @@ $.api = $.fn.api = function(parameters) { var // use window context if none specified - $allModules = $.isFunction(this) + $allModules = isFunction(this) ? $(window) : $(this), moduleSelector = $allModules.selector || '', @@ -316,7 +319,7 @@ $.api = $.fn.api = function(parameters) { } }, validResponse: function(response) { - if( (!module.is.expectingJSON()) || !$.isFunction(settings.successTest) ) { + if( (!module.is.expectingJSON()) || !isFunction(settings.successTest) ) { module.verbose('Response is not JSON, skipping validation', settings.successTest, response); return true; } @@ -539,7 +542,7 @@ $.api = $.fn.api = function(parameters) { context = this, elapsedTime = (new Date().getTime() - requestStartTime), timeLeft = (settings.loadingDuration - elapsedTime), - translatedResponse = ( $.isFunction(settings.onResponse) ) + translatedResponse = ( isFunction(settings.onResponse) ) ? module.is.expectingJSON() && !settings.rawResponse ? settings.onResponse.call(context, $.extend(true, {}, response)) : settings.onResponse.call(context, response) @@ -683,7 +686,7 @@ $.api = $.fn.api = function(parameters) { ; if(responder) { - if( $.isFunction(responder) ) { + if( isFunction(responder) ) { module.debug('Using specified synchronous callback', responder); response = responder.call(context, requestSettings); } @@ -694,7 +697,7 @@ $.api = $.fn.api = function(parameters) { // simulating response mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]); } - else if( $.isFunction(asyncResponder) ) { + else if( isFunction(asyncResponder) ) { asyncCallback = function(response) { module.debug('Async callback returned response', response); @@ -825,7 +828,7 @@ $.api = $.fn.api = function(parameters) { var data = {} ; - if( !$.isWindow(element) ) { + if( !isWindow(element) ) { if( module.is.input() ) { data.value = $module.val(); } @@ -839,7 +842,7 @@ $.api = $.fn.api = function(parameters) { return data; }, event: function() { - if( $.isWindow(element) || settings.on == 'now' ) { + if( isWindow(element) || settings.on == 'now' ) { module.debug('API called without element, no events attached'); return false; } @@ -1046,7 +1049,7 @@ $.api = $.fn.api = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 3f856f7f2e..2f74463721 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -139,7 +139,7 @@ $.fn.form = function(parameters) { submit: function() { module.verbose('Submitting form', $module); submitting = true; - $module.submit(); + $module.trigger('submit'); }, attachEvents: function(selector, action) { @@ -538,7 +538,7 @@ $.fn.form = function(parameters) { ancillary = module.get.ancillaryValue(rule), $field = module.get.field(field.identifier), value = $field.val(), - prompt = $.isFunction(rule.prompt) + prompt = isFunction(rule.prompt) ? rule.prompt(value) : rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule, requiresValue = (prompt.search('{value}') !== -1), @@ -1146,7 +1146,7 @@ $.fn.form = function(parameters) { $field.each(function (_index, el) { var $el = $(el), - $elGroup = $(el).closest($group), + $elGroup = $el.closest($group), isCheckbox = ($el.filter(selector.checkbox).length > 0), isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required), isDisabled = $el.is(':disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled), @@ -1211,21 +1211,21 @@ $.fn.form = function(parameters) { event.stopImmediatePropagation(); } if(settings.errorFocus && ignoreCallbacks !== true) { - var focusElement, hasTabIndex = true; + var $focusElement, hasTabIndex = true; if (typeof settings.errorFocus === 'string') { - focusElement = $(document).find(settings.errorFocus); - hasTabIndex = focusElement.is('[tabindex]'); + $focusElement = $(document).find(settings.errorFocus); + hasTabIndex = $focusElement.is('[tabindex]'); // to be able to focus/scroll into non input elements we need a tabindex if (!hasTabIndex) { - focusElement.attr('tabindex',-1); + $focusElement.attr('tabindex',-1); } } else { - focusElement = $group.filter('.' + className.error).first().find(selector.field); + $focusElement = $group.filter('.' + className.error).first().find(selector.field); } - focusElement.focus(); + $focusElement.trigger('focus'); // only remove tabindex if it was dynamically created above if (!hasTabIndex){ - focusElement.removeAttr('tabindex'); + $focusElement.removeAttr('tabindex'); } } if(ignoreCallbacks !== true) { @@ -1322,7 +1322,7 @@ $.fn.form = function(parameters) { return ruleFunction.call(field, value, ancillary, $module); } ; - if( !$.isFunction(ruleFunction) ) { + if( !isFunction(ruleFunction) ) { module.error(error.noRule, ruleName); return; } @@ -1481,7 +1481,7 @@ $.fn.form = function(parameters) { } }); } - if( $.isFunction( found ) ) { + if( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/behaviors/state.js b/src/definitions/behaviors/state.js index 6951875e6d..3254121390 100644 --- a/src/definitions/behaviors/state.js +++ b/src/definitions/behaviors/state.js @@ -12,9 +12,9 @@ "use strict"; -$.isFunction = $.isFunction || function(obj) { + function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -556,7 +556,7 @@ $.fn.state = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/behaviors/visibility.js b/src/definitions/behaviors/visibility.js index 3742c80ecb..0da8c25483 100755 --- a/src/definitions/behaviors/visibility.js +++ b/src/definitions/behaviors/visibility.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -243,7 +243,7 @@ $.fn.visibility = function(parameters) { handleLoad = function() { loadedCounter++; if (loadedCounter >= images.length) { - if ($.isFunction(callback)) { + if (isFunction(callback)) { callback(); } } @@ -1168,7 +1168,7 @@ $.fn.visibility = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/globals/site.js b/src/definitions/globals/site.js index 2221142641..5b5b3692ca 100644 --- a/src/definitions/globals/site.js +++ b/src/definitions/globals/site.js @@ -10,9 +10,9 @@ ;(function ($, window, document, undefined) { -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} $.site = $.fn.site = function(parameters) { var @@ -388,7 +388,7 @@ $.site = $.fn.site = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { @@ -476,17 +476,12 @@ $.site.settings = { }; // allows for selection of elements with data attributes -$.extend($.expr[ ":" ], { - data: ($.expr.createPseudo) - ? $.expr.createPseudo(function(dataName) { - return function(elem) { - return !!$.data(elem, dataName); - }; - }) - : function(elem, i, match) { - // support: jQuery < 1.8 - return !!$.data(elem, match[ 3 ]); - } +$.extend($.expr.pseudos, { + data: $.expr.createPseudo(function(dataName) { + return function(elem) { + return !!$.data(elem, dataName); + }; + }) }); diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index 8f9d09fc7e..468a40e155 100644 --- a/src/definitions/modules/accordion.js +++ b/src/definitions/modules/accordion.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -356,9 +356,10 @@ $.fn.accordion = function(parameters) { display: function() { module.verbose('Removing inline display from element', this); - $(this).css('display', ''); - if( $(this).attr('style') === '') { - $(this) + var $element = $(this); + $element.css('display', ''); + if($element.attr('style') === '') { + $element .attr('style', '') .removeAttr('style') ; @@ -367,9 +368,10 @@ $.fn.accordion = function(parameters) { opacity: function() { module.verbose('Removing inline opacity from element', this); - $(this).css('opacity', ''); - if( $(this).attr('style') === '') { - $(this) + var $element = $(this); + $element.css('opacity', ''); + if($element.attr('style') === '') { + $element .attr('style', '') .removeAttr('style') ; @@ -525,7 +527,7 @@ $.fn.accordion = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { @@ -615,8 +617,8 @@ $.fn.accordion.settings = { // Adds easing $.extend( $.easing, { - easeOutQuad: function (x, t, b, c, d) { - return -c *(t/=d)*(t-2) + b; + easeOutQuad: function (x) { + return 1 - (1 - x) * (1 - x);; } }); diff --git a/src/definitions/modules/calendar.js b/src/definitions/modules/calendar.js index 2b5f717f6d..a67fb1c719 100644 --- a/src/definitions/modules/calendar.js +++ b/src/definitions/modules/calendar.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -479,24 +479,24 @@ $.fn.calendar = function(parameters) { var rangeDate = (updateRange ? focusDate : null) || date || (!isTouch ? focusDate : null); container.find('td').each(function () { - var cell = $(this); - var cellDate = cell.data(metadata.date); + var $cell = $(this); + var cellDate = $cell.data(metadata.date); if (!cellDate) { return; } - var disabled = cell.hasClass(className.disabledCell); - var active = cell.hasClass(className.activeCell); - var adjacent = cell.hasClass(className.adjacentCell); + var disabled = $cell.hasClass(className.disabledCell); + var active = $cell.hasClass(className.activeCell); + var adjacent = $cell.hasClass(className.adjacentCell); var focused = module.helper.dateEqual(cellDate, focusDate, mode); var inRange = !rangeDate ? false : ((!!startDate && module.helper.isDateInRange(cellDate, mode, startDate, rangeDate)) || (!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate))); - cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && (!adjacent || (settings.selectAdjacentDays && adjacent)) && !disabled); + $cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && (!adjacent || (settings.selectAdjacentDays && adjacent)) && !disabled); - if (module.helper.isTodayButton(cell)) { + if (module.helper.isTodayButton($cell)) { return; } - cell.toggleClass(className.rangeCell, inRange && !active && !disabled); + $cell.toggleClass(className.rangeCell, inRange && !active && !disabled); }); } }, @@ -508,13 +508,13 @@ $.fn.calendar = function(parameters) { refreshTooltips: function() { var winWidth = $(window).width(); $container.find('td[data-position]').each(function () { - var cell = $(this); - var tooltipWidth = window.getComputedStyle(cell[0], '::after').width.replace(/[^0-9\.]/g,''); - var tooltipPosition = cell.attr('data-position'); + var $cell = $(this); + var tooltipWidth = window.getComputedStyle($cell[0], '::after').width.replace(/[^0-9\.]/g,''); + var tooltipPosition = $cell.attr('data-position'); // use a fallback width of 250 (calendar width) for IE/Edge (which return "auto") - var calcPosition = (winWidth - cell.width() - (parseInt(tooltipWidth,10) || 250)) > cell.offset().left ? 'right' : 'left'; + var calcPosition = (winWidth - $cell.width() - (parseInt(tooltipWidth,10) || 250)) > $cell.offset().left ? 'right' : 'left'; if(tooltipPosition.indexOf(calcPosition) === -1) { - cell.attr('data-position',tooltipPosition.replace(/(left|right)/,calcPosition)); + $cell.attr('data-position',tooltipPosition.replace(/(left|right)/,calcPosition)); } }); }, @@ -984,16 +984,16 @@ $.fn.calendar = function(parameters) { focus: function () { if ($input.length) { - $input.focus(); + $input.trigger('focus'); } else { - $container.focus(); + $container.trigger('focus'); } }, blur: function () { if ($input.length) { - $input.blur(); + $input.trigger('blur'); } else { - $container.blur(); + $container.trigger('blur'); } }, @@ -1448,7 +1448,7 @@ $.fn.calendar = function(parameters) { } }); } - if ($.isFunction(found)) { + if (isFunction(found)) { response = found.apply(context, passedArguments); } else if (found !== undefined) { diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index a61015cc03..3e99a60f29 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -159,7 +159,7 @@ $.fn.checkbox = function(parameters) { var $element = $(selector) ; - event = $.isFunction(module[event]) + event = isFunction(module[event]) ? module[event] : module.toggle ; @@ -200,7 +200,7 @@ $.fn.checkbox = function(parameters) { return; } module.toggle(); - $input.focus(); + $input.trigger('focus'); event.preventDefault(); }, keydown: function(event) { @@ -242,7 +242,7 @@ $.fn.checkbox = function(parameters) { shortcutPressed = false; if(key == keyCode.escape) { module.verbose('Escape key pressed blurring field'); - $input.blur(); + $input.trigger('blur'); shortcutPressed = true; event.stopPropagation(); } @@ -783,7 +783,7 @@ $.fn.checkbox = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index b3f3554d21..b8942d1cd6 100755 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -188,7 +188,7 @@ $.fn.dimmer = function(parameters) { }, show: function(callback) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -208,7 +208,7 @@ $.fn.dimmer = function(parameters) { }, hide: function(callback) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -240,7 +240,7 @@ $.fn.dimmer = function(parameters) { animate: { show: function(callback) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -302,7 +302,7 @@ $.fn.dimmer = function(parameters) { } }, hide: function(callback) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -628,7 +628,7 @@ $.fn.dimmer = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 93a3920af3..d0999a7714 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -429,7 +429,7 @@ $.fn.dropdown = function(parameters) { settings.forceSelection = true; } $input - .removeAttr('required') + .prop('required',false) .removeAttr('class') .detach() .prependTo($module) @@ -523,7 +523,7 @@ $.fn.dropdown = function(parameters) { }, show: function(callback, preventFocus) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -557,7 +557,7 @@ $.fn.dropdown = function(parameters) { }, hide: function(callback, preventBlur) { - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -568,7 +568,7 @@ $.fn.dropdown = function(parameters) { module.remove.visible(); // hiding search focus if ( module.is.focusedOnSearch() && preventBlur !== true ) { - $search.blur(); + $search.trigger('blur'); } callback.call(element); }); @@ -955,9 +955,9 @@ $.fn.dropdown = function(parameters) { .filter(function() { // First find the last divider in this divider group // Dividers which are direct siblings are considered a group - var lastDivider = $(this).nextUntil(selector.item); + var $lastDivider = $(this).nextUntil(selector.item); - return (lastDivider.length ? lastDivider : $(this)) + return ($lastDivider.length ? $lastDivider : $(this)) // Count all non-filtered items until the next divider (or end of the dropdown) .nextUntil(selector.divider) .filter(selector.item + ":not(." + className.filtered + ")") @@ -1012,18 +1012,18 @@ $.fn.dropdown = function(parameters) { if( module.has.search() && !module.is.focusedOnSearch() ) { if(skipHandler) { $module.off('focus' + eventNamespace, selector.search); - $search.focus(); + $search.trigger('focus'); $module.on('focus' + eventNamespace, selector.search, module.event.search.focus); } else { - $search.focus(); + $search.trigger('focus'); } } }, blurSearch: function() { if( module.has.search() ) { - $search.blur(); + $search.trigger('blur'); } }, @@ -1384,7 +1384,7 @@ $.fn.dropdown = function(parameters) { ; // prevents IE11 bug where menu receives focus even though `tabindex=-1` if (document.activeElement.tagName.toLowerCase() !== 'input') { - $(document.activeElement).blur(); + $(document.activeElement).trigger('blur'); } if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) { if(module.is.searchSelection()) { @@ -1585,7 +1585,7 @@ $.fn.dropdown = function(parameters) { if(module.is.searchSelection()) { module.remove.searchTerm(); if(module.is.multiple()) { - $search.focus(); + $search.trigger('focus'); } } } @@ -1741,11 +1741,11 @@ $.fn.dropdown = function(parameters) { selectAction: function(text, value) { selectActionActive = true; module.verbose('Determining action', settings.action); - if( $.isFunction( module.action[settings.action] ) ) { + if( isFunction( module.action[settings.action] ) ) { module.verbose('Triggering preset action', settings.action, text, value); module.action[ settings.action ].call(element, text, value, this); } - else if( $.isFunction(settings.action) ) { + else if( isFunction(settings.action) ) { module.verbose('Triggering user action', settings.action, text, value); settings.action.call(element, text, value, this); } @@ -1760,7 +1760,7 @@ $.fn.dropdown = function(parameters) { inDocument = ($target.closest(document.documentElement).length > 0), inModule = ($target.closest($module).length > 0) ; - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -1782,7 +1782,7 @@ $.fn.dropdown = function(parameters) { notOnLabel = ($module.find($label).length === 0 || !(module.is.multiple() && settings.useLabels)), notInMenu = ($target.closest($menu).length === 0) ; - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -2097,7 +2097,7 @@ $.fn.dropdown = function(parameters) { values.sort(function(a, b) { return (a.name.toLowerCase().localeCompare(b.name.toLowerCase())); }); - } else if($.isFunction(settings.sortSelect)) { + } else if(isFunction(settings.sortSelect)) { values.sort(settings.sortSelect); } select[fields.values] = values; @@ -2469,7 +2469,7 @@ $.fn.dropdown = function(parameters) { ; if(isMultiple && hasSearchValue) { module.verbose('Adjusting input width', searchWidth, settings.glyphWidth); - $search.css('width', searchWidth); + $search.css('width', searchWidth + 'px'); } if(hasSearchValue || (isSearchMultiple && valueIsSet)) { module.verbose('Hiding placeholder text'); @@ -3650,7 +3650,7 @@ $.fn.dropdown = function(parameters) { }, transition ; - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -3701,7 +3701,7 @@ $.fn.dropdown = function(parameters) { }, transition = settings.transition.hideMethod || module.get.transition($subMenu) ; - callback = $.isFunction(callback) + callback = isFunction(callback) ? callback : function(){} ; @@ -3959,7 +3959,7 @@ $.fn.dropdown = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/modules/embed.js b/src/definitions/modules/embed.js index 471c02bc6f..96b9ffad71 100644 --- a/src/definitions/modules/embed.js +++ b/src/definitions/modules/embed.js @@ -12,9 +12,9 @@ "use strict"; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -536,7 +536,7 @@ $.fn.embed = function(parameters) { } }); } - if ( $.isFunction( found ) ) { + if ( isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { diff --git a/src/definitions/modules/flyout.js b/src/definitions/modules/flyout.js index 6ea971720f..fe7e95ef41 100644 --- a/src/definitions/modules/flyout.js +++ b/src/definitions/modules/flyout.js @@ -12,9 +12,9 @@ 'use strict'; -$.isFunction = $.isFunction || function(obj) { +function isFunction(obj) { return typeof obj === "function" && typeof obj.nodeType !== "number"; -}; +} window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -105,7 +105,7 @@ $.flyout = $.fn.flyout = function(parameters) { module.create.id(); if(!isFlyoutComponent) { module.create.flyout(); - if(!$.isFunction(settings.onHidden)) { + if(!isFunction(settings.onHidden)) { settings.onHidden = function () { module.destroy(); $module.remove(); @@ -134,17 +134,19 @@ $.flyout = $.fn.flyout = function(parameters) { icon = el[fields.icon] ? '' : '', text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML), cls = module.helpers.deQuote(el[fields.class] || ''), - click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {} + click = el[fields.click] && isFunction(el[fields.click]) ? el[fields.click] : function () {} ; $actions.append($('