PageSourceSearch

https://lallytours.com/wp-content/themes/traveltour-child/lally-pricing/lally-pricing.js

js lallytours.com collected 2026-10-04 15:03:08 UTC 2,294 bytes, 61 lines download raw bytes

1// lally-pricing.js - alignment script
2(function(){
3  function alignDestinations(){
4    const wrapper = document.querySelector('.lally-pricing-wrapper');
5    if(!wrapper) return;
6    const cards = Array.from(wrapper.querySelectorAll('.lally-pricing-card'));
7    if(cards.length === 0) return;
8
9    const firstDest = cards[0].querySelector('.lally-feature-group');
10    if(!firstDest) return;
11
12    // reset before measure
13    cards.forEach(card => {
14      const dest = card.querySelector('.lally-feature-group');
15      if(dest) dest.style.minHeight = '';
16    });
17
18    const height = Math.ceil(firstDest.getBoundingClientRect().height);
19
20    // Apply to other cards' destination groups
21    cards.forEach((card, idx) => {
22      const dest = card.querySelector('.lally-feature-group');
23      if(!dest) return;
24      if(idx === 0) return; // keep first untouched
25      dest.style.minHeight = height + 'px';
26    });
27  }
28
29  function clearMinHeightsForMobile(){
30    if(window.innerWidth <= 768){
31      const wrapper = document.querySelector('.lally-pricing-wrapper');
32      if(!wrapper) return;
33      const cards = Array.from(wrapper.querySelectorAll('.lally-pricing-card'));
34      cards.forEach(card => {
35        const dest = card.querySelector('.lally-feature-group');
36        if(dest) dest.style.minHeight = '';
37      });
38      return true;
39    }
40    return false;
41  }
42
43  let resizeTimer;
44  document.addEventListener('DOMContentLoaded', function(){
45    if(!clearMinHeightsForMobile()) alignDestinations();
46    window.addEventListener('load', function(){ if(!clearMinHeightsForMobile()) alignDestinations(); });
47    window.addEventListener('resize', function(){
48      clearTimeout(resizeTimer);
49      resizeTimer = setTimeout(function(){ if(!clearMinHeightsForMobile()) alignDestinations(); }, 220);
50    });
51
52    const wrapper = document.querySelector('.lally-pricing-wrapper');
53    if(wrapper && 'MutationObserver' in window){
54        const mo = new MutationObserver(function(){
55          clearTimeout(resizeTimer);
56          resizeTimer = setTimeout(function(){ if(!clearMinHeightsForMobile()) alignDestinations(); }, 220);
57        });
58        mo.observe(wrapper, { childList: true, subtree: true, attributes: false });
59    }
60  });
61})();

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.