Place the below code in your header script area this delete this block.

<script>/* Polaroid scatter settle */
(function () {
  var TRIGGER = 0.85;  // plays when the gallery's top reaches 85% down the screen
  var SCATTER = 70;    // how far photos fly in from (percent of a photo's size)
  var SPIN = 25;       // max tilt in degrees while scattered
  var REST_TILT = 3;   // max tilt once landed (0 = perfectly straight grid)
  var STAGGER = 90;    // ms between each photo landing
  var DURATION = 900;  // ms each landing takes (keep in sync with 0.9s in the CSS)

  var galleries = [];
  var ticking = false;
  var reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

  function rand(max) {
    return (Math.random() * 2 - 1) * max;
  }

  function setup(el) {
    var items = el.querySelectorAll('.kadence-blocks-gallery-item');
    if (!items.length) items = el.querySelectorAll('li'); // fallback for other Kadence versions
    if (!items.length) return null;

    Array.prototype.forEach.call(items, function (item, i) {
      item.classList.add('cc-pol-item');

      // put the polaroid frame on the wrapper inside, so Kadence's gutter stays as spacing
      var frame = item.firstElementChild || item;
      frame.classList.add('cc-pol-frame');

      item.style.setProperty('--sx', rand(SCATTER).toFixed(1) + '%');
      item.style.setProperty('--sy', (rand(SCATTER * 0.6) - SCATTER * 0.5).toFixed(1) + '%'); // mostly from above
      item.style.setProperty('--sr', rand(SPIN).toFixed(1) + 'deg');
      item.style.setProperty('--rr', rand(REST_TILT).toFixed(1) + 'deg');
      item.style.setProperty('--d', i * STAGGER + 'ms');
    });

    return { el: el, items: items, done: false };
  }

  function play(g) {
    g.done = true;
    g.el.classList.add('cc-pol-settled');

    // once everyone has landed, remove the delays so hovers feel instant
    setTimeout(function () {
      Array.prototype.forEach.call(g.items, function (item) {
        item.style.setProperty('--d', '0ms');
      });
    }, g.items.length * STAGGER + DURATION);
  }

  function check() {
    var vh = window.innerHeight;
    var waiting = false;

    galleries.forEach(function (g) {
      if (g.done) return;
      if (g.el.getBoundingClientRect().top < vh * TRIGGER) {
        play(g);
      } else {
        waiting = true;
      }
    });

    ticking = false;
    if (!waiting) window.removeEventListener('scroll', onScroll); // all done, stop listening
  }

  function onScroll() {
    if (!ticking) {
      ticking = true;
      requestAnimationFrame(check);
    }
  }

  function init() {
    document.querySelectorAll('.cc-polaroid').forEach(function (el) {
      var g = setup(el);
      if (!g) return;
      galleries.push(g);

      if (reduce) {
        el.classList.add('cc-pol-settled'); // polaroid frames, no toss
        g.done = true;
        return;
      }

      void el.offsetHeight; // lock in the scattered starting positions first
      el.classList.add('cc-pol-ready');
    });
    if (!galleries.length) return;

    window.addEventListener('scroll', onScroll, { passive: true });
    // wait two frames so the starting positions are painted before anything lands
    requestAnimationFrame(function () {
      requestAnimationFrame(check);
    });
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', init);
  } else {
    init();
  }
})();</script>
Search
BPB – Checkboxes
  • BLOG POST BUILDERS (226)
    • – Highlighted Notes (33)
    • – Styled Lists (28)
    • – Call to Action (23)
    • – Blog Post Sections (17)
    • – Featured Products – Manual (14)
    • – Affiliate Product Promotions (13)
    • – Email Optins (13)
    • – Featured Blog Posts – Kadence Free (13)
    • – Testimonials/Reviews (11)
    • – Podcast Callouts (10)
    • – FAQs (9)
    • – Borders (7)
    • – Gallery (7)
    • – LTK Ready (6)
    • – Quotes (6)
    • – Tips (6)
    • – Author Box (5)
    • – Featured Blog Posts – Kadence Pro (5)
    • – Table of Contents (5)
    • – Youtube/Video (5)
    • – Image Captions (4)
    • – Sharing (4)
    • – Featured Products – WooCommerce (2)
    • – Pros and Cons (2)
    • – Tables (2)
    • – Search (1)
  • WEBSITE BUILDERS (111)
    • – Featured Sections (21)
    • – Movement (18)
    • – 3 Columns (11)
    • – Membership (10)
    • – About Section (9)
    • – Timelines (5)
    • – Marquee (4)
    • – Reviews (4)
    • – 4 columns (3)
    • – 6 Columns (3)
    • – Pricing Tables (3)
    • – Tabbed Blocks (3)
    • – Instagram Pages (2)
    • – Navigation (2)
  • PROBUILDER BLOCKS (96)
    • – Elements (51)
      • – – Sidebar Elements (15)
      • – – Archive Elements (10)
      • – – Footer Elements (8)
      • – – Archive Loop Item Elements (5)
      • – – Post Title Elements (5)
      • – – Mega Menu Elements (3)
      • – – 404 Page Elements (2)
      • – – Mobile Menu Elements (1)
      • – – Promo Elements (1)
    • – Pro Blocks (45)
      • – – Featured Posts (34)
      • – Hero Sections (23)
      • – – Image Overlay (5)
      • – – Modal Blocks (4)
      • – – Slider Blocks (3)
  • FULL POSTS (23)
    • – Roundup Posts (7)
    • – Listicle Posts (4)
    • – For Podcasters (3)
    • – For Faith Based Bloggers (2)
    • – For Food Bloggers (2)
    • – For Photographers (2)
    • – Interview Posts (1)
    • – Q and A Posts (1)
  • **NEW** (9)