PageSourceSearch

https://galaxyaccess.us/wp-content/plugins/wp-floating-menu-pro/js/frontend.js?ver=2.0.8

js galaxyaccess.us collected 2026-10-01 15:32:51 UTC 12,799 bytes, 241 lines download raw bytes

1(function ($) {
2    $(function () {
3
4        /** Trigger Menu stretch */
5        if ($(".wpfm-nav-strech-trigger")[0] && ($(".wpfm-nav-strech-trigger").attr('id') == 'right' || $(".wpfm-nav-strech-trigger").attr('id') == 'left')) {
6            $('.wpfm-nav-strech-trigger').click(function (e) {
7                $this = $(this);
8                var template_type = $(this).closest('.wpfm-menu-wrapper').attr('template-type');
9                $(this).closest('.wpfm-menu-wrapper').toggleClass('wpfm-nav-div-open wpfm-nav-div-closed');
10                if (template_type == 'template-16') {
11                    if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-open')) {
12                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "visible", "opacity": "1"});
13                    } else if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-closed')) {
14                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "hidden", "opacity": "0"});
15                    }
16                } else {
17                    $(this).closest('.wpfm-floating-wh-wrapper').find('.wpfm-nav-strech-trigger').fadeOut();
18                    $(this).closest('.wpfm-floating-wh-wrapper').find('ul.wpfm-nav-show-hide').animate({height: "toggle", opacity: "toggle"}, "slow");
19                }
20            });
21        } else if ($(".wpfm-nav-strech-trigger")[0] && ($(".wpfm-nav-strech-trigger").attr('id') != 'right' || $(".wpfm-nav-strech-trigger").attr('id') != 'left')) {
22            $('.wpfm-nav-strech-trigger').click(function (e) {
23                $this = $(this);
24                var template_type = $(this).closest('.wpfm-menu-wrapper').attr('template-type');
25                $(this).closest('.wpfm-menu-wrapper').toggleClass('wpfm-nav-div-open wpfm-nav-div-closed');
26                if (template_type == 'template-16') {
27                    if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-open')) {
28                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "visible", "opacity": "1"});
29                    } else if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-closed')) {
30                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "hidden", "opacity": "0"});
31                    }
32                } else {
33                    $(this).closest('.wpfm-floating-wh-wrapper').find('ul.wpfm-nav-show-hide').animate({height: "toggle", opacity: "toggle"}, "slow");
34                }
35                if ($(this).attr('data-expand-default') == 'block') {
36                    $(this).closest('.wpfm-floating-wh-wrapper').find('.wpfm-nav-strech-trigger').fadeOut();
37                }
38            });
39        }
40
41        /** Trigger Menu close */
42        if ($(".wpfm-nav-close-trigger")[0] && ($(".wpfm-nav-close-trigger").attr('id') == 'right'
43            || $(".wpfm-nav-close-trigger").attr('id') == 'left')) {
44            $('.wpfm-nav-close-trigger').click(function (e) {
45                e.preventDefault();
46                var template_type = $(this).closest('.wpfm-menu-wrapper').attr('template-type');
47                $(this).closest('.wpfm-menu-wrapper').removeClass('wpfm-nav-div-open');
48                $(this).closest('.wpfm-floating-wh-wrapper').find('.wpfm-nav-strech-trigger').fadeIn();
49                if (template_type == 'template-16') {
50                    if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-open')) {
51                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "visible", "opacity": "1"});
52                    } else if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-closed')) {
53                        $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "hidden", "opacity": "0"});
54                    }
55                } else {
56                    $(this).closest('.wpfm-floating-wh-wrapper').find('ul.wpfm-nav-show-hide').animate({"height": "hide", opacity: "hide"}, "slow");
57                }
58            });
59    } else if ($(".wpfm-nav-close-trigger")[0] && ($(".wpfm-nav-close-trigger").attr('id') != 'right'
60        || $(".wpfm-nav-close-trigger").attr('id') != 'left')) {
61        $('.wpfm-nav-close-trigger').click(function (e) {
62            e.preventDefault();
63            var template_type = $(this).closest('.wpfm-menu-wrapper').attr('template-type');
64            $(this).closest('.wpfm-menu-wrapper').removeClass('wpfm-nav-div-open');
65            if (template_type == 'template-16') {
66                if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-open')) {
67                    $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "hidden", "opacity": "0"});
68                } else if ($(this).closest('.wpfm-menu-wrapper').hasClass('wpfm-nav-div-closed')) {
69                    $(this).closest('.wpfm-menu-wrapper').find('ul.wpfm-nav-show-hide').css({"visibility": "visible", "opacity": "1"});
70                }
71            } else {
72                $(this).closest('.wpfm-floating-wh-wrapper').find('ul.wpfm-nav-show-hide').animate({"height": "hide", opacity: "hide"}, "slow");
73            }
74            if ($(this).attr('data-expand-default') == 'block') {
75                $(this).closest('.wpfm-floating-wh-wrapper').find('.wpfm-nav-strech-trigger').fadeIn();
76            }
77        });
78    }
79
80    /** On hover effect for template 7 */
81    $(".wpfm-menu-name").hover(function () {
82        $(this).find('.wpfm-tootltip-title').css('opacity', '1');
83    });
84
85        /**
86         * Add no-touch class to body for mobile touch events 
87         * Hover toggle for touch activated
88         */
89         var clickBtn = true;
90         if ("ontouchstart" in document.documentElement) {
91            // Add wpfm-touch class to the document html
92            document.documentElement.className += " wpfm-touch";
93            var container = $('#wpfm-floating-menu-nav ul li a, #wpfm-floating-menu-nav ul li.wpfm-modal-popup-link a, #wpfm-floating-menu-nav ul li a[href^="#"]');
94
95            // Prevent First click on menu if touch device
96            $(document).on('click', '#wpfm-floating-menu-nav ul li a, #wpfm-floating-menu-nav ul li.wpfm-modal-popup-link a, #wpfm-floating-menu-nav ul li a[href^="#"]', function (e) {
97                container.not(this).removeClass('wpfm_hover_effect');
98                $(this).toggleClass('wpfm_hover_effect')
99                if($(this).hasClass('wpfm_hover_effect')){
100                  e.preventDefault();
101              }else{
102               // alert(1);
103           }
104       });
105    
106    // if the target of the click isn't the container nor a descendant of the container
107    $(document).mouseup(function (e)
108    {
109       if (!container.is(e.target) // if the target of the click isn't the container...
110          && container.has(e.target).length === 0) // ... nor a descendant of the container
111       {
112        container.removeClass('wpfm_hover_effect');
113    }
114});
115}
116
117/** Initialize active class for on scroll event */
118if ($('.wpfm-floating-wh-wrapper a[href^="#"]').length > 0) {
119    $(document).on("scroll", onScroll);
120}
121
122/** Inline Navigation Js */
123$('.wpfm-floating-wh-wrapper a[href^="#"]').on('click', function (e) {
124    e.preventDefault();
125    var target = $(this).attr('href');
126    if ($(target).length > 0) {
127        $('html, body').stop().animate({
128            'scrollTop': $(target).offset().top + 1
129        }, 900, 'swing', function () {
130            $(document).on("scroll", onScroll);
131        });
132                //$('.wpfm-floating-wh-wrapper a[href^="#"]').removeClass('wpfm-active-nav'); 
133                //$(this).addClass('wpfm-active-nav');
134            }
135        });
136
137        /**
138         *  Add Class on scroll 
139         */
140         function onScroll(event) {
141            var scrollPos = $(document).scrollTop();
142            $('.wpfm-menu-wrapper a[href^="#"]').each(function () {
143                var currLink = $(this);
144                var refElement = $(currLink.attr("href"));
145                var positon_offset_var = $(this).data("pos-offset-var");
146                if (positon_offset_var == '1') {
147                    if (refElement != '#' && $(refElement).length > 0) {
148                        if (refElement.offset().top) {
149                            if (refElement.offset().top <= scrollPos && refElement.offset().top + refElement.height() > scrollPos) {
150                                $('.wpfm-menu-wrapper ul li').removeClass("wpfm-active-nav");
151                                currLink.parent("li").addClass("wpfm-active-nav");
152                            } else {
153                                currLink.parent("li").removeClass("wpfm-active-nav");
154                            }
155                        }
156                    }
157                } else {
158                    if (refElement != '#' && $(refElement).length > 0) {
159                        if (refElement.position().top) {
160                            if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
161                                $('.wpfm-menu-wrapper ul li').removeClass("wpfm-active-nav");
162                                currLink.parent("li").addClass("wpfm-active-nav");
163                            } else {
164                                currLink.parent("li").removeClass("wpfm-active-nav");
165                            }
166                        }
167                    }
168                }
169
170            });
171        }
172
173        /** 
174         * If scroll and show after certain height for home page
175         * */
176         $('.wpfm-menu-wrapper').each(function () {
177            $this = $(this);
178            var scroll_call = $this.data('scroll-call');
179            var scroll_pos_val = $this.data('scroll-value');
180            if (scroll_call === 1) {
181                $(document).scroll(function () {
182                    var y = $(this).scrollTop();
183                    if (y >= scroll_pos_val) {
184                        $this.show();
185                    } else {
186                        $this.hide();
187                    }
188                });
189            }
190        });
191
192        /** 
193         * If modal popup is enabled, check for class and show related hidden contents 
194         */
195         $('.wpfm-menu-wrapper ul li.wpfm-modal-popup-link a').on('click', function (e) {
196            if ($(this).closest('li').hasClass('wpfm-modal-popup-link')) {
197                e.preventDefault();
198                var menu_id = $(this).closest('.wpfm-menu-wrapper').attr('menu-id');
199                var section_id = $(this).closest('li').data('li-key');
200                $('.wpfm-menu-additional-content-inner').fadeOut();
201                $('.wpfm-menu-additional-content-overlay').fadeOut();
202                $(this).closest('.wpfm-menu-wrapper').find('#wpfm-id-' + menu_id + '-key-' + section_id + '-content').fadeToggle();
203                $(this).closest('.wpfm-menu-wrapper').find('#wpfm-menu-additional-content-overlay-' + menu_id).fadeToggle();
204            } else {
205                e.preventDefault();
206            }
207        });
208
209        /** 
210         * If modal popup is enabled, close modal popup contents 
211         */
212         $('.wpfm-menu-additional-content-close, .wpfm-menu-additional-content-overlay').on('click', function (e) {
213            $('.wpfm-menu-additional-content-inner').hide();
214            $('.wpfm-menu-additional-content-overlay').hide();
215        });
216
217//        if ($(".wpfm-menu-wrapper .wpfm-nav-hover-trigger")[0]) {
218//            $('.wpfm-menu-wrapper .wpfm-nav-hover-trigger').mouseover(function () {
219//                var template = $(this).attr('id');
220//                // Hide the elements initially
221//                var lis = $(this).parents('.wpfm-menu-wrapper').find('li').hide();
222//                // When expand anchor tag is hovered. 
223//                var i = 0;
224//
225//                // FadeIn each list item over 200 ms, and,
226//                // when finished, recursively call displayMenuLiContent.
227//                // When eq(i) refers to an element that does not exist,
228//                // jQuery will return an empty object, and not continue
229//                // to fadeIn.
230//                (function displayMenuLiContent() {
231//                     lis.eq(i++).fadeIn(300, displayMenuLiContent);
232//                })();
233//            });
234//        }
235
236
237
238}); /** Function ends */
239}(jQuery));
240
241

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.