??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/am1atec.co.uk/wp-content/themes/astra/assets/js/unminified/sticky-sidebar.js
⬅ Kembali
/**
* File sticky-sidebar.js.
*
* Feature: Sticky Sidebar
* Description: Calculates offset for sticky sidebar positioning.
* @package Astra
* @since x.x.x
*/
(function () {
'use strict';
window.astraStickySidebar = {
/**
* Check whether the header type is sticky and active or not.
*/
isStickyHeaderActive: function( header, headerStick ) {
return ( headerStick && "0" !== headerStick && null !== header );
},
/**
* Get the top offset from header for sticky sidebar start position.
*/
getOffset: function () {
let offset = 0;
const abvHeader = document.querySelector('.ast-above-header-bar');
const primaryHeader = document.querySelector('.ast-primary-header-bar');
const blwHeader = document.querySelector('.ast-below-header-bar');
const desktopBreakpoint = astra_sticky_sidebar.desktop_breakpoint ? parseInt( astra_sticky_sidebar.desktop_breakpoint ) : 922;
if ( window.innerWidth >= desktopBreakpoint && ( abvHeader || primaryHeader || blwHeader ) ) {
if ( document.body.classList.contains( 'admin-bar' ) ) {
offset += 32;
}
if ( astra_sticky_sidebar.sticky_header_addon ) {
if ( window.astraStickySidebar.isStickyHeaderActive( abvHeader, astra_sticky_sidebar.header_above_stick ) ) {
offset += Math.floor( parseInt( astra_sticky_sidebar.header_above_height.desktop ) );
}
if ( window.astraStickySidebar.isStickyHeaderActive( primaryHeader, astra_sticky_sidebar.header_main_stick ) ) {
offset += Math.floor( parseInt( astra_sticky_sidebar.header_height.desktop ) );
}
if ( window.astraStickySidebar.isStickyHeaderActive( blwHeader, astra_sticky_sidebar.header_below_stick ) ) {
offset += Math.floor( parseInt( astra_sticky_sidebar.header_below_height.desktop ) );
}
}
return offset;
}
},
/**
* Initiate the sticky sidebar.
*/
activateStickySidebar: function() {
if ( ! document.body.classList.contains( 'ast-sticky-sidebar' ) ) {
return;
}
const sidebar = document.querySelector( '#secondary .sidebar-main' );
if ( sidebar && astra_sticky_sidebar.sticky_sidebar_on ) {
const offset = window.astraStickySidebar.getOffset();
sidebar.style.top = Math.floor( offset + 50 ) + 'px';
sidebar.style.maxHeight = 'calc( 100vh - ' + Math.floor( offset + 50 ) + 'px )';
}
},
init: function () {
// Kick off the sticky sidebar activation.
window.astraStickySidebar.activateStickySidebar();
}
}
if ( 'loading' === document.readyState ) {
// The DOM has not yet been loaded.
document.addEventListener( 'DOMContentLoaded', window.astraStickySidebar.init );
} else {
// The DOM has already been loaded.
window.astraStickySidebar.init();
}
})();
Nama
Tipe
Ukuran
Diubah
Aksi
📜 add-to-cart-quantity-btn.js
js
11.1 KB
2026-06-04 20:14
📜 command-palette.js
js
2.3 KB
2026-06-04 20:14
📜 customizer-controls-toggle.js
js
2.6 KB
2026-06-04 20:14
📜 customizer-controls.js
js
3.1 KB
2026-06-04 20:14
📜 customizer-google-fonts.js
js
2.5 KB
2026-06-04 20:14
📜 customizer-preview.js
js
125.4 KB
2026-06-04 20:14
📜 customizer-quick-tour.js
js
1.8 KB
2026-06-04 20:14
📜 customizer-style-guide.js
js
4.4 KB
2026-06-04 20:14
📜 extend-customizer.js
js
6.4 KB
2026-06-04 20:14
📜 flexibility.js
js
25.1 KB
2026-06-04 20:14
📜 frontend-pro.js
js
6.7 KB
2026-06-04 20:14
📜 frontend.js
js
52.1 KB
2026-06-04 20:14
📜 ie-compat.js
js
1.2 KB
2026-06-04 20:14
📜 live-search.js
js
5 KB
2026-06-04 20:14
📜 mobile-cart.js
js
11.6 KB
2026-06-04 20:14
📜 shop-add-to-cart.js
js
1.2 KB
2026-06-04 20:14
📜 skip-link-focus-fix.js
js
1 KB
2026-06-04 20:14
📜 sticky-add-to-cart.js
js
1.4 KB
2026-06-04 20:14
📜 sticky-sidebar.js
js
3.1 KB
2026-06-04 20:14
📜 style-guide-previewer.js
js
1002 B
2026-06-04 20:14
📜 style.js
js
23.2 KB
2026-06-04 20:14