Jump to content

Carousel B&W filter / mouse-over event disable

Go to solution Solved by tuanphan,

Recommended Posts

The following page shows a simple way to achieve a greyscale solution, but I cannot seem to get it to work on the carousel:

 

#user-items-list-carousel__slides user-items-list-carousel__slides--initialized:hover img {filter: grayscale(50%)}

 

Link to comment
  • Solution
On 3/2/2023 at 1:58 AM, Bertie said:

Add to Design > Custom CSS

.user-items-list-item-container[data-section-id="62ffdd571fe4027515d357c3"] li:hover img {
    filter: grayscale(50%);
}
.user-items-list-item-container[data-section-id="62ffdd571fe4027515d357c3"] .user-items-list-carousel__slide {
    pointer-events: initial !important;
   
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Many thanks for you help !

I modofied the code to work in reverse:

 

.user-items-list-item-container[data-section-id="62ffdd571fe4027515d357c3"] li img {
    filter: grayscale(100%);
}
.user-items-list-item-container[data-section-id="62ffdd571fe4027515d357c3"] li:hover img {
    transition: 0.5s;
    filter: grayscale(0%);
}
.user-items-list-item-container[data-section-id="62ffdd571fe4027515d357c3"] .user-items-list-carousel__slide {
    pointer-events: initial !important;   
}

The Transition property also makes it a little more elegant.

Cool and thank you for your time !

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.