PageSourceSearch

https://technicamix.com/wp-content/themes/powerwp/assets/js/custom.js

js technicamix.com collected 2026-10-02 20:05:29 UTC 3,442 bytes, 91 lines download raw bytes

1jQuery(document).ready(function($) {
2
3    if(powerwp_ajax_object.sticky_menu){
4    // grab the initial top offset of the navigation 
5    var powerwpstickyNavTop = $('.powerwp-primary-menu-container').offset().top;
6    
7    // our function that decides weather the navigation bar should have "fixed" css position or not.
8    var powerwpstickyNav = function(){
9        var powerwpscrollTop = $(window).scrollTop(); // our current vertical position from the top
10             
11        // if we've scrolled more than the navigation, change its position to fixed to stick to top,
12        // otherwise change it back to relative
13
14        if(window.innerWidth > 1112) {
15            if (powerwpscrollTop > powerwpstickyNavTop) {
16                $('.powerwp-primary-menu-container').addClass('powerwp-fixed');
17            } else {
18                $('.powerwp-primary-menu-container').removeClass('powerwp-fixed'); 
19            }
20        }
21    };
22
23    powerwpstickyNav();
24    // and run it again every time you scroll
25    $(window).on( "scroll", function() {
26        powerwpstickyNav();
27    });
28    }
29
30    $(".powerwp-nav-primary .powerwp-primary-nav-menu").addClass("powerwp-primary-responsive-menu");
31
32    $( ".powerwp-primary-responsive-menu-icon" ).on( "click", function(event) {
33        $(this).next(".powerwp-nav-primary .powerwp-primary-nav-menu").slideToggle();
34    });
35
36    $(window).on( "resize", function() {
37        if(window.innerWidth > 1112) {
38            $(".powerwp-nav-primary .powerwp-primary-nav-menu, nav .sub-menu, nav .children").removeAttr("style");
39            $(".powerwp-primary-responsive-menu > li").removeClass("powerwp-primary-menu-open");
40        }
41    });
42
43    $( ".powerwp-primary-responsive-menu > li" ).on( "click", function(event) {
44        if (event.target !== this)
45        return;
46        $(this).find(".sub-menu:first").toggleClass('powerwp-submenu-toggle').parent().toggleClass("powerwp-primary-menu-open");
47        $(this).find(".children:first").toggleClass('powerwp-submenu-toggle').parent().toggleClass("powerwp-primary-menu-open");
48    });
49
50    $( "div.powerwp-primary-responsive-menu > ul > li" ).on( "click", function(event) {
51        if (event.target !== this)
52            return;
53        $(this).find("ul:first").toggleClass('powerwp-submenu-toggle').parent().toggleClass("powerwp-primary-menu-open");
54    });
55
56    $(".post").fitVids();
57
58    var scrollButtonEl = $( '.powerwp-scroll-top' );
59    scrollButtonEl.hide();
60
61    $(window).on( "scroll", function() {
62        if ( $( window ).scrollTop() < 20 ) {
63            $( '.powerwp-scroll-top' ).fadeOut();
64        } else {
65            $( '.powerwp-scroll-top' ).fadeIn();
66        }
67    } );
68
69    scrollButtonEl.on( "click", function() {
70        $( "html, body" ).animate( { scrollTop: 0 }, 300 );
71        return false;
72    } );
73
74
75    $('.powerwp-main-wrapper, .powerwp-sidebar-one-wrapper, .powerwp-sidebar-two-wrapper').theiaStickySidebar({
76        containerSelector: ".powerwp-content-inner-wrapper",
77        additionalMarginTop: 0,
78        additionalMarginBottom: 0,
79        minWidth: 1107,
80    });
81
82    $(window).on( "resize", function() {
83        $('.powerwp-main-wrapper, .powerwp-sidebar-one-wrapper, .powerwp-sidebar-two-wrapper').theiaStickySidebar({
84            containerSelector: ".powerwp-content-inner-wrapper",
85            additionalMarginTop: 0,
86            additionalMarginBottom: 0,
87            minWidth: 1107,
88        });
89    });
90
91});

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.