Scroll vertically on image click

Solved
Tourist
5 0 1

Hi, Is it possible to allow make an image clickable and trigger the event of scrolling vertically?
If so, How do I do that on a particular page?

0 Likes
Shopify Partner
36 7 34

So I understand better, you want the page to scroll to a certain area when you click the image?

 

What theme are you using? 

 

Thanks,

Ken.

Personal Shopify Development for $40 an hour. Contact me by private message or by email at info@kenkinneen.com
1 Like
Tourist
5 0 1

Yeah, scroll to a specific section. Using Debut as theme. 

0 Likes
Shopify Partner
36 7 34

Hi,

 

If you add a name tag like below to the div or element you want to scroll to.

 

<div name="box"> </div>

Then make a link in your navigation like this : /#box

 

It will scroll to that section,

 

Thanks,

Ken.

 

Personal Shopify Development for $40 an hour. Contact me by private message or by email at info@kenkinneen.com
1 Like
Tourist
5 0 1
<div name="box"> </div>

Okay. So this goes under the page?

But this navigation link: /#box goes under?

 

0 Likes
Highlighted

Success.

Shopify Partner
36 7 34

The top piece surrounds your content that you want to scroll to like 

 

<div name="box"> 
   <p> The content you would like to scroll too </p>
</div>

The /#box is what you are going to link to in your href or in your navigation menu.

Personal Shopify Development for $40 an hour. Contact me by private message or by email at info@kenkinneen.com
1 Like

Success.

Shopify Partner
36 7 34

The top piece surrounds your content that you want to scroll to like 

<div name="box"> 
   <p> The content you would like to scroll too </p>
</div>

The /#box is what you are going to link to in your href or in your navigation menu.

Personal Shopify Development for $40 an hour. Contact me by private message or by email at info@kenkinneen.com
1 Like
Tourist
5 0 1

Thanks. You simplified my life a fair bit.
I actually couldn't make it work using the name tag, instead I link to the id instead.
Which works.
But couldn't have been possible without your guide. 
Thanks again

1 Like