HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/scripts/stickySidebar.js
/* global xts_settings */
(function($) {
	XTSThemeModule.$document.on('xtsPjaxComplete', function () {
		XTSThemeModule.stickySidebar();
	});

	XTSThemeModule.stickySidebar = function() {
		if (XTSThemeModule.isTabletSize || 'undefined' === typeof $.fn.stick_in_parent) {
			return;
		}

		var $sidebar = $('.xts-sidebar');

		if ($sidebar.hasClass('xts-sidebar-hidden-lg') && $sidebar.hasClass('xts-sidebar-hidden-md')) {
			return;
		}

		if ($sidebar.hasClass('xts-sidebar-hidden-lg') && !$sidebar.hasClass('xts-sidebar-hidden-md') && XTSThemeModule.isDesktopSize) {
			return;
		}

		if ($sidebar.hasClass('xts-sidebar-hidden-md') && !$sidebar.hasClass('xts-sidebar-hidden-lg') && XTSThemeModule.isTabletSize) {
			return;
		}

		$('.xts-sidebar-sticky .xts-sidebar-inner').stick_in_parent({
			offset_top: parseInt(xts_settings.sticky_sidebar_offset),
			sticky_class: 'xts-is-stuck',
		});
	};

	$(document).ready(function() {
		XTSThemeModule.stickySidebar();
	});
})(jQuery);