Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/js
File: custom.js
} else {
[5000] Fix | Delete
$slide_menu_container.css({
[5001] Fix | Delete
right: '-' + slide_container_width + 'px'
[5002] Fix | Delete
});
[5003] Fix | Delete
$page_container.css({
[5004] Fix | Delete
left: '0'
[5005] Fix | Delete
});
[5006] Fix | Delete
}
[5007] Fix | Delete
[5008] Fix | Delete
if (is_boxed_layout && et_is_fixed_nav) {
[5009] Fix | Delete
if (is_rtl) {
[5010] Fix | Delete
$header_container.css({
[5011] Fix | Delete
right: page_container_margin + 'px'
[5012] Fix | Delete
});
[5013] Fix | Delete
} else {
[5014] Fix | Delete
$header_container.css({
[5015] Fix | Delete
left: page_container_margin + 'px'
[5016] Fix | Delete
});
[5017] Fix | Delete
}
[5018] Fix | Delete
} // hide the menu after animation completed
[5019] Fix | Delete
[5020] Fix | Delete
[5021] Fix | Delete
setTimeout(function () {
[5022] Fix | Delete
$slide_menu_container.css({
[5023] Fix | Delete
'display': 'none'
[5024] Fix | Delete
});
[5025] Fix | Delete
}, 700);
[5026] Fix | Delete
} else {
[5027] Fix | Delete
$slide_menu_container.css({
[5028] Fix | Delete
'display': 'block'
[5029] Fix | Delete
}); // add some delay to make sure css animation applied correctly
[5030] Fix | Delete
[5031] Fix | Delete
setTimeout(function () {
[5032] Fix | Delete
if (is_rtl) {
[5033] Fix | Delete
$slide_menu_container.css({
[5034] Fix | Delete
left: '0'
[5035] Fix | Delete
});
[5036] Fix | Delete
$page_container.css({
[5037] Fix | Delete
right: '-' + (slide_container_width - page_container_margin) + 'px'
[5038] Fix | Delete
});
[5039] Fix | Delete
} else {
[5040] Fix | Delete
$slide_menu_container.css({
[5041] Fix | Delete
right: '0'
[5042] Fix | Delete
});
[5043] Fix | Delete
$page_container.css({
[5044] Fix | Delete
left: '-' + (slide_container_width - page_container_margin) + 'px'
[5045] Fix | Delete
});
[5046] Fix | Delete
}
[5047] Fix | Delete
[5048] Fix | Delete
if (is_boxed_layout && et_is_fixed_nav) {
[5049] Fix | Delete
var left_position = 0 > slide_container_width - page_container_margin * 2 ? Math.abs(slide_container_width - page_container_margin * 2) : '-' + (slide_container_width - page_container_margin * 2);
[5050] Fix | Delete
[5051] Fix | Delete
if (left_position < slide_container_width) {
[5052] Fix | Delete
if (is_rtl) {
[5053] Fix | Delete
$header_container.css({
[5054] Fix | Delete
right: left_position + 'px'
[5055] Fix | Delete
});
[5056] Fix | Delete
} else {
[5057] Fix | Delete
$header_container.css({
[5058] Fix | Delete
left: left_position + 'px'
[5059] Fix | Delete
});
[5060] Fix | Delete
}
[5061] Fix | Delete
}
[5062] Fix | Delete
}
[5063] Fix | Delete
}, 50);
[5064] Fix | Delete
}
[5065] Fix | Delete
[5066] Fix | Delete
$('body').toggleClass('et_pb_slide_menu_active');
[5067] Fix | Delete
$slide_menu_container.toggleClass('et_pb_slide_menu_opened');
[5068] Fix | Delete
} // Scrolling to the correct place on page if Fixed Nav enabled
[5069] Fix | Delete
[5070] Fix | Delete
[5071] Fix | Delete
function et_adjust_woocommerce_checkout_scroll() {
[5072] Fix | Delete
if (!et_is_fixed_nav) {
[5073] Fix | Delete
return;
[5074] Fix | Delete
}
[5075] Fix | Delete
[5076] Fix | Delete
var window_width = parseInt($et_window.width());
[5077] Fix | Delete
[5078] Fix | Delete
if (980 >= window_width) {
[5079] Fix | Delete
return;
[5080] Fix | Delete
}
[5081] Fix | Delete
[5082] Fix | Delete
var headerHeight = parseInt($('#main-header').innerHeight()); // scroll to the top of checkout form taking into account fixed header height
[5083] Fix | Delete
[5084] Fix | Delete
$('html, body').animate({
[5085] Fix | Delete
scrollTop: $('form.checkout').offset().top - 100 - headerHeight
[5086] Fix | Delete
}, 1000);
[5087] Fix | Delete
}
[5088] Fix | Delete
[5089] Fix | Delete
$('#main-header').on('click', '.et_toggle_slide_menu', function () {
[5090] Fix | Delete
et_toggle_slide_menu();
[5091] Fix | Delete
});
[5092] Fix | Delete
[5093] Fix | Delete
if (et_is_touch_device) {
[5094] Fix | Delete
// open slide menu on swipe left
[5095] Fix | Delete
$et_window.on('swipeleft', function (event) {
[5096] Fix | Delete
var window_width = parseInt($et_window.width()),
[5097] Fix | Delete
swipe_start = parseInt(event.swipestart.coords[0]); // horizontal coordinates of the swipe start
[5098] Fix | Delete
// if swipe started from the right edge of screen then open slide menu
[5099] Fix | Delete
[5100] Fix | Delete
if (30 >= window_width - swipe_start) {
[5101] Fix | Delete
et_toggle_slide_menu('open');
[5102] Fix | Delete
}
[5103] Fix | Delete
}); // close slide menu on swipe right
[5104] Fix | Delete
[5105] Fix | Delete
$et_window.on('swiperight', function (event) {
[5106] Fix | Delete
if ($('body').hasClass('et_pb_slide_menu_active')) {
[5107] Fix | Delete
et_toggle_slide_menu('close');
[5108] Fix | Delete
}
[5109] Fix | Delete
});
[5110] Fix | Delete
}
[5111] Fix | Delete
[5112] Fix | Delete
$('#page-container').on('click', '.et_toggle_fullscreen_menu', function () {
[5113] Fix | Delete
et_pb_toggle_fullscreen_menu();
[5114] Fix | Delete
});
[5115] Fix | Delete
[5116] Fix | Delete
function et_pb_toggle_fullscreen_menu() {
[5117] Fix | Delete
var $menu_container = $('.et_header_style_fullscreen .et_slide_in_menu_container'),
[5118] Fix | Delete
top_bar_height = $menu_container.find('.et_slide_menu_top').innerHeight();
[5119] Fix | Delete
$menu_container.toggleClass('et_pb_fullscreen_menu_opened');
[5120] Fix | Delete
$('body').toggleClass('et_pb_fullscreen_menu_active');
[5121] Fix | Delete
et_pb_resize_fullscreen_menu();
[5122] Fix | Delete
[5123] Fix | Delete
if ($menu_container.hasClass('et_pb_fullscreen_menu_opened')) {
[5124] Fix | Delete
$menu_container.addClass('et_pb_fullscreen_menu_animated'); // adjust the padding in fullscreen menu
[5125] Fix | Delete
[5126] Fix | Delete
$menu_container.css({
[5127] Fix | Delete
'padding-top': top_bar_height + 20
[5128] Fix | Delete
});
[5129] Fix | Delete
} else {
[5130] Fix | Delete
setTimeout(function () {
[5131] Fix | Delete
$menu_container.removeClass('et_pb_fullscreen_menu_animated');
[5132] Fix | Delete
}, 1000);
[5133] Fix | Delete
}
[5134] Fix | Delete
}
[5135] Fix | Delete
[5136] Fix | Delete
function et_pb_resize_fullscreen_menu(e) {
[5137] Fix | Delete
if (builder_scripts_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isBuilder"]) {
[5138] Fix | Delete
var $menu = jQuery('.et_header_style_fullscreen .et_slide_in_menu_container.et_pb_fullscreen_menu_opened');
[5139] Fix | Delete
[5140] Fix | Delete
if ($menu.length > 0) {
[5141] Fix | Delete
var height = jQuery(top_window).height(); // Account for padding
[5142] Fix | Delete
[5143] Fix | Delete
height -= parseInt($menu.css('padding-top'), 10); // and AdminBar
[5144] Fix | Delete
[5145] Fix | Delete
if ($menu.closest('.admin-bar').length > 0) {
[5146] Fix | Delete
height -= 32;
[5147] Fix | Delete
}
[5148] Fix | Delete
[5149] Fix | Delete
$menu.find('.et_pb_fullscreen_nav_container').css('max-height', height);
[5150] Fix | Delete
}
[5151] Fix | Delete
}
[5152] Fix | Delete
}
[5153] Fix | Delete
[5154] Fix | Delete
$(window).unload(function () {
[5155] Fix | Delete
/**
[5156] Fix | Delete
* Fix the issue with Fullscreen menu, that remains open,
[5157] Fix | Delete
* when back button is clicked in Firefox
[5158] Fix | Delete
*/
[5159] Fix | Delete
if ($('body').hasClass('et_pb_fullscreen_menu_active')) {
[5160] Fix | Delete
$('.et_toggle_fullscreen_menu').trigger('click');
[5161] Fix | Delete
}
[5162] Fix | Delete
});
[5163] Fix | Delete
$('.et_pb_fullscreen_nav_container').on('click', 'li.menu-item-has-children > a', function () {
[5164] Fix | Delete
var $this_parent = $(this).closest('li'),
[5165] Fix | Delete
$this_arrow = $this_parent.find('>a .et_mobile_menu_arrow'),
[5166] Fix | Delete
$closest_submenu = $this_parent.find('>ul'),
[5167] Fix | Delete
is_opened_submenu = $this_arrow.hasClass('et_pb_submenu_opened'),
[5168] Fix | Delete
sub_menu_max_height;
[5169] Fix | Delete
$this_arrow.toggleClass('et_pb_submenu_opened');
[5170] Fix | Delete
[5171] Fix | Delete
if (is_opened_submenu) {
[5172] Fix | Delete
$closest_submenu.removeClass('et_pb_slide_dropdown_opened');
[5173] Fix | Delete
$closest_submenu.slideToggle(700, 'easeInOutCubic');
[5174] Fix | Delete
} else {
[5175] Fix | Delete
$closest_submenu.slideToggle(700, 'easeInOutCubic');
[5176] Fix | Delete
$closest_submenu.addClass('et_pb_slide_dropdown_opened');
[5177] Fix | Delete
}
[5178] Fix | Delete
[5179] Fix | Delete
return false;
[5180] Fix | Delete
}); // define initial padding-top for fullscreen menu container
[5181] Fix | Delete
[5182] Fix | Delete
if ($('body').hasClass('et_header_style_fullscreen')) {
[5183] Fix | Delete
var $menu_container = $('.et_header_style_fullscreen .et_slide_in_menu_container');
[5184] Fix | Delete
[5185] Fix | Delete
if ($menu_container.length) {
[5186] Fix | Delete
var top_bar_height = $menu_container.find('.et_slide_menu_top').innerHeight();
[5187] Fix | Delete
$menu_container.css({
[5188] Fix | Delete
'padding-top': top_bar_height + 20
[5189] Fix | Delete
});
[5190] Fix | Delete
}
[5191] Fix | Delete
} // adjust the scrolling position on Woocommerce checkout page in case of error
[5192] Fix | Delete
[5193] Fix | Delete
[5194] Fix | Delete
$(document.body).on('checkout_error', function () {
[5195] Fix | Delete
et_adjust_woocommerce_checkout_scroll();
[5196] Fix | Delete
});
[5197] Fix | Delete
$(document.body).on('updated_checkout', function (data) {
[5198] Fix | Delete
if ('failure' !== data.result) {
[5199] Fix | Delete
return;
[5200] Fix | Delete
}
[5201] Fix | Delete
[5202] Fix | Delete
et_adjust_woocommerce_checkout_scroll();
[5203] Fix | Delete
}); // Override row selector in VB
[5204] Fix | Delete
[5205] Fix | Delete
$et_window.on('et_fb_init', function () {
[5206] Fix | Delete
var wp = top_window.wp;
[5207] Fix | Delete
[5208] Fix | Delete
if (wp && wp.hooks && wp.hooks.addFilter) {
[5209] Fix | Delete
var replacement = window.DIVI.row_selector;
[5210] Fix | Delete
wp.hooks.addFilter('et.pb.row.css.selector', 'divi.et.pb.row.css.selector', function (selector) {
[5211] Fix | Delete
return selector.replace('%%row_selector%%', replacement);
[5212] Fix | Delete
});
[5213] Fix | Delete
}
[5214] Fix | Delete
});
[5215] Fix | Delete
})(jQuery);
[5216] Fix | Delete
[5217] Fix | Delete
/***/ }),
[5218] Fix | Delete
[5219] Fix | Delete
/***/ "./node_modules/webpack/buildin/global.js":
[5220] Fix | Delete
/*!***********************************!*\
[5221] Fix | Delete
!*** (webpack)/buildin/global.js ***!
[5222] Fix | Delete
\***********************************/
[5223] Fix | Delete
/*! no static exports found */
[5224] Fix | Delete
/***/ (function(module, exports) {
[5225] Fix | Delete
[5226] Fix | Delete
var g;
[5227] Fix | Delete
[5228] Fix | Delete
// This works in non-strict mode
[5229] Fix | Delete
g = (function() {
[5230] Fix | Delete
return this;
[5231] Fix | Delete
})();
[5232] Fix | Delete
[5233] Fix | Delete
try {
[5234] Fix | Delete
// This works if eval is allowed (see CSP)
[5235] Fix | Delete
g = g || new Function("return this")();
[5236] Fix | Delete
} catch (e) {
[5237] Fix | Delete
// This works if the window reference is available
[5238] Fix | Delete
if (typeof window === "object") g = window;
[5239] Fix | Delete
}
[5240] Fix | Delete
[5241] Fix | Delete
// g can still be undefined, but nothing to do about it...
[5242] Fix | Delete
// We return undefined, instead of nothing here, so it's
[5243] Fix | Delete
// easier to handle this case. if(!global) { ...}
[5244] Fix | Delete
[5245] Fix | Delete
module.exports = g;
[5246] Fix | Delete
[5247] Fix | Delete
[5248] Fix | Delete
/***/ }),
[5249] Fix | Delete
[5250] Fix | Delete
/***/ "./node_modules/webpack/buildin/module.js":
[5251] Fix | Delete
/*!***********************************!*\
[5252] Fix | Delete
!*** (webpack)/buildin/module.js ***!
[5253] Fix | Delete
\***********************************/
[5254] Fix | Delete
/*! no static exports found */
[5255] Fix | Delete
/***/ (function(module, exports) {
[5256] Fix | Delete
[5257] Fix | Delete
module.exports = function(module) {
[5258] Fix | Delete
if (!module.webpackPolyfill) {
[5259] Fix | Delete
module.deprecate = function() {};
[5260] Fix | Delete
module.paths = [];
[5261] Fix | Delete
// module.parent = undefined by default
[5262] Fix | Delete
if (!module.children) module.children = [];
[5263] Fix | Delete
Object.defineProperty(module, "loaded", {
[5264] Fix | Delete
enumerable: true,
[5265] Fix | Delete
get: function() {
[5266] Fix | Delete
return module.l;
[5267] Fix | Delete
}
[5268] Fix | Delete
});
[5269] Fix | Delete
Object.defineProperty(module, "id", {
[5270] Fix | Delete
enumerable: true,
[5271] Fix | Delete
get: function() {
[5272] Fix | Delete
return module.i;
[5273] Fix | Delete
}
[5274] Fix | Delete
});
[5275] Fix | Delete
module.webpackPolyfill = 1;
[5276] Fix | Delete
}
[5277] Fix | Delete
return module;
[5278] Fix | Delete
};
[5279] Fix | Delete
[5280] Fix | Delete
[5281] Fix | Delete
/***/ }),
[5282] Fix | Delete
[5283] Fix | Delete
/***/ "jquery":
[5284] Fix | Delete
/*!*************************!*\
[5285] Fix | Delete
!*** external "jQuery" ***!
[5286] Fix | Delete
\*************************/
[5287] Fix | Delete
/*! no static exports found */
[5288] Fix | Delete
/***/ (function(module, exports) {
[5289] Fix | Delete
[5290] Fix | Delete
module.exports = jQuery;
[5291] Fix | Delete
[5292] Fix | Delete
/***/ })
[5293] Fix | Delete
[5294] Fix | Delete
/******/ });
[5295] Fix | Delete
//# sourceMappingURL=custom.js.map
[5296] Fix | Delete
//# sourceMappingURL=custom.js.map
[5297] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function