PageSourceSearch

https://janusintl.au/wp-content/themes/Avada-Child-Theme/js/faq-script.js?ver=1787217954

js janusintl.au collected 2026-10-09 22:16:02 UTC 1,859 bytes, 51 lines download raw bytes

1jQuery(function ($) {
2    $(document).ready(function () {
3        
4        if (!$('.faq-container').length) return;
5        
6        var header_height = $('.main-header').outerHeight();
7        var faqSectionTop = $('.faq-container').offset().top;
8        var isSmallScreen = $(window).width() <= 767;
9
10        // Function to handle scroll animation
11        function handleScrollAnimation() {
12            if (!isSmallScreen) {
13                $('html, body').animate({
14                    scrollTop: faqSectionTop - header_height
15                }, 800);
16            }
17        }
18
19        // Tab navigation
20        $('.faq-tabs-navigation a').click(function (e) {
21            e.preventDefault();
22            $('.faq-tabs-navigation a').removeClass('active');
23            $('.faq-tab-content').hide();
24            $(this).addClass('active');
25            var tabId = $(this).attr('href');
26            $(tabId).fadeIn();
27
28            // Scroll animation depending on screen size
29            handleScrollAnimation();
30        });
31
32        // FAQ item toggle
33        $('.faq-item').click(function (e) {
34            e.preventDefault();
35            if ($(this).hasClass('active')) {
36                $(this).removeClass('active').find('.faq-answer').slideUp();
37            } else {
38                $('.faq-item').removeClass('active').find('.faq-answer').slideUp();
39                $(this).addClass('active').find('.faq-answer').slideDown();
40            }
41        });
42
43        // Check on window resize
44        $(window).resize(function () {
45            isSmallScreen = $(window).width() <= 767;
46            // Recalculate the header height and FAQ section top on resize
47            header_height = $('.main-header').outerHeight();
48            faqSectionTop = $('.faq-container').offset().top;
49        });
50    });
51});

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.