PageSourceSearch

https://blockminded.com/wp-content/themes/total-plus/inc/walker/assets/megaMenu.js?ver=1.00

js blockminded.com collected 2026-10-04 08:24:01 UTC 2,539 bytes, 77 lines download raw bytes

1var $j = jQuery.noConflict(),
2        $window = $j(window);
3
4$j(document).on('ready', function () {
5    "use strict";
6    // Mega menu
7    
8    var container = $j('.ht-header .ht-container');
9
10    $j('.ht-menu .menu-item-megamenu.megamenu-full-width').hover(function () {
11        var $siteHeader = container,
12                $menuWidth = $siteHeader.outerWidth(),
13                $menuPosition = $siteHeader.offset(),
14                $menuItemPosition = $j(this).offset(),
15                $PositionLeft = $menuItemPosition.left - $menuPosition.left + 1;
16
17        $j(this).find('.megamenu').css({'left': '-' + $PositionLeft + 'px', 'width': $menuWidth});
18    });
19
20    // Megamenu auto width
21    $j('.ht-menu .menu-item-megamenu.megamenu-auto-width .megamenu').each(function () {
22        var $li = $j(this).parent(),
23                $liOffset = $li.offset().left,
24                $liWidth = $j(this).parent().width(),
25                $dropdowntMarginLeft = $liWidth / 2,
26                $dropdownWidth = $j(this).outerWidth(),
27                $dropdowntLeft = $liOffset - $dropdownWidth / 2;
28
29        if ($dropdowntLeft < 0) {
30            var $left = $liOffset - 10;
31            $dropdowntMarginLeft = 0;
32        } else {
33            var $left = $dropdownWidth / 2;
34
35        }
36
37        if ( total_megamenu.rtl == 'true' ) {
38            $j( this ).css( {
39                'right': - $left,
40                'marginRight': $dropdowntMarginLeft
41            } );
42        } else {
43            $j( this ).css( {
44                'left': - $left,
45                'marginLeft': $dropdowntMarginLeft
46            } );
47        }
48
49        var $dropdownRight = ($window.width()) - ($liOffset - $left + $dropdownWidth + $dropdowntMarginLeft);
50
51        if ($dropdownRight < 0) {
52            $j(this).css({
53                'left': 'auto',
54                'right': -($window.width() - $liOffset - $liWidth - 10)
55            });
56        }
57    });
58
59    $j('li.heading-yes > a').on('click', function () {
60        return false;
61    });
62
63    $j('.cat-megamenu-tab > div:first').addClass('active-tab');
64
65    $j('.cat-megamenu-tab > div').hoverIntent(function () {
66        var $this = $j(this);
67        if ($this.hasClass('active-tab')) {
68            return;
69        }
70
71        $this.siblings().removeClass('active-tab');
72        $this.addClass('active-tab');
73        var activeCat = $this.data('catid');
74        $this.closest('.megamenu').find('.cat-megamenu-content > ul').hide();
75        $this.closest('.megamenu').find('#' + activeCat).fadeIn('fast');
76    });
77});

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.