Browser Back Button

Function

</ head>

</ body>

<!-- Browser Back Button -->
<script>
$( document ).ready(function() {
	$( ".back-button__class-name" ).click(function() { // Create any class name between the " ". Then add this class name to any back button on that page.  
		window.history.back();
	});
});
</script>

HTML/Embed

Author
Noah Raskin
Published
May 21, 2020

How to use:

This code crumb is super simple to use. Simply place this snippet into the footer custom code section on any page you have/need a back button on. If you would like it global to reduce the amount of times it is pasted, then just add it in the footer custom code section within your site settings.

You'll see a class name in the snippet by default named ".back-button__class-name" which you can change to anything you want like "back-button" or "back-link" etc. Once you've done that just add that class to any back button you have and that's it.

Tutorial Coming Soon!

This short JQuery code crumb will allow you to add make any button (your dedicated back button) return the user to the previous page using the browser history.

Clone Project
Documentation
Author:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor