Jump to content

CSS solution to have the whole carousel gallery block link to a particular page when the user clicks on it or any image of it.

Go to solution Solved by tuanphan,

Recommended Posts

Hi, 

On my page https://www.celsodinizphoto.com/ the very first object is a carousel gallery block, under the title of Favorites. 

Question: Is it possible to have that whole block to be clickable and associated with a link to https://www.celsodinizphoto.com/home ?

I do not want to add that clickthrough link to every image in the gallery. I am looking for a CSS solution to have the whole carousel gallery block link to a particular page when the user clicks on it or any image of it. 

Thanks!

Celso.

Link to comment
  • Eunice_SQSP changed the title to CSS solution to have the whole carousel gallery block link to a particular page when the user clicks on it or any image of it.
  • Solution

Add to Last Line in Code Injection > Footer

<script>
$(document).ready(function() { 
		$("div#block-yui_3_17_2_1_1677849844342_21973").click(function() {
			var link = $(this).text(),
				href = "https://google.com";
			window.location.href=href;
		});
});
</script>

Replace google with new url

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.