Liquid, JavaScript, themes, sales channels
I am trying to create a button that will return the user back to the previous page that they came from. I have tried:
<a href="javascript:history.go(-1)">Click here to go back to previous page</a>
but for some reason it does not work.
Anyone have any ideas on how to get something like this working?
You could try putting your JS inside the onclick="" attribute instead of the href="" one.
Probably better to use a button in this case instead of an anchor:
<button onclick="history.go(-1)">Click here to back to previous page</button>
Where should I place the coding in Shopify? Thanks so much.
This blog post is a recap of the webinar Getting Ready For BFCM: How To Run A Flash Sal...
By Jacqui Oct 3, 2023Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023