Jump to content

How to let 2 different ID's interact with same object?

Go to solution Solved by paul2009,

Recommended Posts

Hello there!

I am kind of stuck and would really appreciate if someone could help me! 🙂

The Problem: On my website I have an image (on which I applied a hover effect, which triggers a zoom-in and inverse-grayscale effect). So if you hover over the image some fancy stuff happens. On top of the image I placed a H1 title. So as soon as I hover over the H1, the effects from the image return to default. Is there a way the effects stay visible while hovering over the H1?

Here is the code I used for the hover-effects on the image:

#block-yui_3_17_2_1_1704269165979_5456 img {filter: grayscale(100%);}

#block-yui_3_17_2_1_1704269165979_5456:hover img {filter: grayscale(0%);
  transform: scale(1.05);
transition: .4s ease-in-out;}

#block-yui_3_17_2_1_1704269165979_5456 img {transform: scale(1);
transition: .4s ease-in-out;}

Thanks in advance!

Link to comment
1 hour ago, Ewta said:

if you hover over the image some fancy stuff happens. On top of the image I placed a H1 title. So as soon as I hover over the H1, the effects from the image return to default. Is there a way the effects stay visible while hovering over the H1?

It depends. Do you need users to click the title or not? If you don't, you can prevent pointer events (hovering/clicking) for the h1 title and this should resolve the issue. Forum users will need a link to the page to provide more detailed help.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
  • Solution

As I say, you can prevent pointer events with some CSS. For example, to affect the title in the "Photography" tile you could add something like this:

.fe-block.fe-block-yui_3_17_2_1_1704283491882_2035 {
  pointer-events: none;
}

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

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.