PageSourceSearch

https://thirtysixdigital.com/wp-content/plugins/themescamp-core/el…/assets/js/tcg-depends/container.js

js thirtysixdigital.com collected 2026-10-08 22:49:49 UTC 4,134 bytes, 96 lines download raw bytes

1!(function ($) {
2
3    let device_width = window.innerWidth;
4
5    $(window).load(function () {
6        $('[data-settings]').each(function () {
7            let settings = $(this).data('settings');
8            if (settings['tc_container_background_parallax'] == 'yes') {
9                $(this).parallaxie({
10                    speed: 0.4,
11                    size: "cover",
12                });
13                $(this).css({ 'background-image': '', '--background-transition': '0' })
14            }
15        });
16    });
17
18    function waitForElementToExist(selector) {
19        return new Promise(resolve => {
20            if (document.querySelector(selector)) {
21                return resolve(document.querySelector(selector));
22            }
23
24            const observer = new MutationObserver(() => {
25                if (document.querySelector(selector)) {
26                    resolve(document.querySelector(selector));
27                    observer.disconnect();
28                }
29            });
30
31            observer.observe(document.body, {
32                subtree: true,
33                childList: true,
34            });
35        });
36    }
37
38    $(document).ready(function () {
39
40        $('[data-settings]').each(function () {
41            let settings = $(this).data('settings');
42            if (settings['tc_dark_mode_responsive_hide_in_dark'] == 'yes') {
43                $(this).addClass('tc-hide-in-dark')
44            } else if (settings['tc_dark_mode_responsive_hide_in_light'] == 'yes') {
45                $(this).addClass('tc-hide-in-light')
46            } else if (settings['tc_container_hover_selector'] == 'parent-container') {
47                $(this).addClass(`tc-container-hover-selector-parent-container`)
48            } else if ((settings['tcg_advanced_hover'] == 'yes' && device_width > 1024) ||
49                (settings['tcg_advanced_hover_tablet'] == 'yes' && device_width < 1024 && device_width > 767) ||
50                (settings['tcg_advanced_hover_mobile'] == 'yes' && device_width < 767)) {
51                $(this).addClass('tc-container-advanced-hover hidden')
52            }
53        });
54
55        $('.tc-container-advanced-hover').parent().on('mouseenter', function () {
56            const $element = $(this).find('.tc-container-advanced-hover');
57            $element.removeClass('hidden');
58            $element.addClass('tcg-container-adv-hover-active');
59        }).on('mouseleave', function () {
60            const $element = $(this).find('.tc-container-advanced-hover');
61            $element.removeClass('tcg-container-adv-hover-active');
62            $element.one('animationend', function () {
63                $element.addClass('hidden');
64            });
65        });
66
67        waitForElementToExist('.sticky-wrapper').then((elm) => {
68            $('.tc-hide-nav-onscroll').each(function () {
69                $(this).parent().addClass('tc-hide-nav-onscroll-handler')
70            });
71
72            $('.tc-display-nav-onscroll').each(function () {
73                $(this).parent().addClass('tc-display-nav-onscroll-handler')
74            });
75        });
76
77        var wind = $(window);
78        var width = $(window).width();
79        if (width > 991) {
80            wind.on('scroll', function () {
81                if ($('.is-sticky')[0]) {
82                    $('.admin-bar .tcg-offcanvas-wrapper').css('top', 0);
83                } else {
84                    $('.admin-bar .tcg-offcanvas-wrapper').css('top', '');
85                }
86            });
87        }
88
89        $('.e-parent .tc-container-hover-selector-parent-container').parent().on('mouseenter', function () {
90            $(this).find('.tc-container-hover-selector-parent-container').addClass('tc-parent-container-hover-active'); // Add the active class to '.selector-type-container' inside 'e-parent'
91        }).on('mouseleave', function () {
92            $(this).find('.tc-container-hover-selector-parent-container').removeClass('tc-parent-container-hover-active'); // Remove the active class from '.selector-type-container' inside 'e-parent'
93        });
94
95    });
96})(jQuery); 

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.