Jump to content

square_case

Circle Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by square_case

  1. On 2/5/2024 at 1:42 PM, square_case said:

    Here is the website link:
    https://www.clearchain.house

    I wanted to show the portfolio first child image when someone open the website and also on hover the portfolio items it will show the different image. and make the items not clickable.

    I attached the section image below.

    image.thumb.png.393037a0da2b12964619b70e6773b1f8.png

    this is the code that I'm using for it:

    <script>
      document.addEventListener('DOMContentLoaded', function () {
        // Find the first .portfolio-hover-item and set data-active to true
        var firstPortfolioItem = document.querySelector('.portfolio-hover-item:first-child');
        if (firstPortfolioItem) {
          firstPortfolioItem.setAttribute('data-active', 'true');
        }
      });
    </script>

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.