Streaming live at 10am (PST)

Button that refreshes the page


#1

Hello.
Is it possible to create a button that refreshes the page? How to do it?

Thanks


#2

Hi @Daniel_Ace, you can make this by first creating a button and assigning it an ID from the settings tab. Then go to your site settings, to the Custom Code tab, and in the Footer code panel, add the following:

<script>
	$( "#button" ).click(function() {
  		location.reload();
	});
</script>

Where #button is the id of the button that you want to reload/refresh the page. This essentially does the same thing as pressing the refresh button in the browser.

After adding the custom code, republish your site. The custom code will only work on the published site, not in the editor or the preview mode.

​I hope this helps. Cheers, Dave


#3

Thank you, Dave. You really helped me)))


#4

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.