Jump to content

Click on any part of a cover page with slide show to let user jump to home page. How handle cookie banner clicks? Using Wells template.

Recommended Posts

Posted

Hi everyone, I'm struggeling with this problem: On my web site landing page (a cover page) a slide show is running and I want my visitor to be able to click anywhere in the screen to jump to my home page. Previously i had a button set up to take that action and the body text had a link, but I found this obstrusive and wanted to get rid of boxes and text links.

My current solution is working well as long you don't visit the site for the first time and the cookie banner is popping up. As you need to cklick on one of the options, the code will interpret such click and jump directly to my home page after selecting cookie options. I also suspect that the cookie options will never get correctly transmitted to the site.

Question: How can I handle a full screen click through over a slide show and at the same time allowing cookies to be selected without affecting this? I'm not a coder, but understand basics of code and css and how to handle them with css and injection on my site. I guess a block ID and javascript will be necessary to be used, but I have no clue how to do it.

Optional question: ist there a way to make my visitor jump to the home page anyway after the cover page slide show is finished, basically setting up a no repeat and jump to a page action at the end? This is not supported in the coverpage design interface, of course... I didn't find any post about this topic when browsing for a solution.

The code I'm currently using on my site, which is ignoring cookies, is

<body onclick="window.location.href='/architekturfotografie';" style="cursor:pointer; width:100%; height:100%;">
</body>

Any solution would be highly appreciated!

Cheers

Markus

markus/architectureshooting
web site: http://architectureshooting.com

  • Replies 6
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Try this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(window).ready(function() {
   $('body').fadeIn(3700, function() {
   //wait 5 seconds and redirect to new URL
   $(this).delay(5000).fadeOut(2000, function() { window.location = 'https://architectureshooting.com/architekturfotografie'; });
   });
});
</script>

 

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!)

Posted (edited)

Thank you Tuan, but this would work for what was my optional second question, as it just fades out the screen after a certain time, useful when set up for the full slide show lenght.

But I'm still missing a code which makes cookie option selectable without registering that click for leaving the running slide show and jump to my portfolio page. In case cookies are already selected and the banner is not appearing, the current solution on my web site is perfect. But for a first time visitor, cookie options will probably not be registered and the click on the option will transfer immediately to the portfolio page. How keep that banner interaction "in front" of the slideshow?

Edited by architectureshooting

markus/architectureshooting
web site: http://architectureshooting.com

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.