PageSourceSearch

https://pricereporter.com/wp-content/themes/pricereporter/assets/js/elementor-custom.js

js pricereporter.com collected 2026-10-02 09:57:29 UTC 1,870 bytes, 49 lines download raw bytes

1jQuery(document).ready(function($) {
2    $('.e-show-more-toggle .elementor-tab-title').on('click', function () {
3        let toggleText = ( $(this).find('.elementor-toggle-title').text() === 'READ MORE' ) ? 'READ LESS' : 'READ MORE';
4    
5        $(this).find('.elementor-toggle-title').text(toggleText);
6    });
7
8    // Click handler for all buttons with id format js-tab-btn-n
9    $('[id^="js-tab-btn-"]').on('click', function(e) {
10        e.preventDefault();
11
12        // Get the tab number from the button id
13        var buttonId = $(this).attr('id');
14        var tabIndex = buttonId.split('-').pop();
15
16        // Find and click on the corresponding default navigation button
17        var $defaultTabButton = $('[data-tab-index="' + tabIndex + '"]');
18        if ($defaultTabButton.length) {
19            $defaultTabButton.trigger('click');
20        }
21    });
22});
23
24// Closed Elementor Accordion
25$(window).on('load',function() {
26    let eAccordionClosed = $('#faq-closed');
27    if ( eAccordionClosed.length > 0 ) {
28        $('#faq-closed .elementor-tab-title').removeClass('elementor-active');
29        $('#faq-closed .elementor-tab-content').css('display', 'none');
30    }
31});
32
33// Fix Elementor bug for swiper missing width/height images
34// Read more about issue https://github.com/elementor/elementor/issues/11348
35// Input the width and height on img tag. 
36window.addEventListener('load', function() {
37    var images = document.querySelectorAll('.swiper-slide-image');
38    images.forEach(function(image) {
39        image.width = image.offsetWidth;
40        image.height = image.offsetHeight;
41    });
42}); // Linsten when resize 
43window.addEventListener('resize', function() {
44    var images = document.querySelectorAll('.swiper-slide-image');
45    images.forEach(function(image) {
46        image.width = image.offsetWidth;
47        image.height = image.offsetHeight;
48    });
49});

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.