// http://getuikit.com/docs/documentation_javascript.html#js-override if (typeof UIkit !== 'undefined') { UIkit.on('beforeready.uk.dom', function () { // accrodion if (typeof UIkit.components.accordion !== "undefined") { // check if accordion component is defined $.extend(UIkit.components.accordion.prototype.defaults, { easing: $.bez(easing_swiftOut), duration: 200 }); } // dropdown if (typeof UIkit.components.dropdown.prototype !== "undefined") { // check if dropdown component is defined $.extend(UIkit.components.dropdown.prototype.defaults, { remaintime: 150, delay: 50 }); (function() { var old_show_function = UIkit.components.dropdown.prototype.show; UIkit.components.dropdown.prototype.show = function() { this.dropdown .css({ 'min-width': this.dropdown.outerWidth() }) .addClass('uk-dropdown-active uk-dropdown-shown'); return old_show_function.apply(this, arguments); } })(); (function() { var old_hide_function = UIkit.components.dropdown.prototype.hide; UIkit.components.dropdown.prototype.hide = function() { var this_dropdown = this.dropdown; this_dropdown.removeClass('uk-dropdown-shown'); var dropdown_timeout = setTimeout(function() { this_dropdown.removeClass('uk-dropdown-active') },280); return old_hide_function.apply(this, arguments); } })(); } // modal if (typeof UIkit.components.modal !== "undefined") { // check if modal component is defined $.extend(UIkit.components.modal.prototype.defaults, { center: true }); UIkit.modal.dialog.template = '