JS Code SnippetOn the page you want this to appear, add an HTML widget (FREE) and paste the code in there. Be sure to have < script> before your code and after the code if it isn't already inserted above.
Instructions
Add the class “click-to-login” to whatever button or container
document.addEventListener('DOMContentLoaded', function () { // Find all containers with the class "click-to-login" var containers = document.querySelectorAll('.click-to-login');
// Add click event listener for each container containers.forEach(function (container) { container.addEventListener('click', function (event) { // Prevent default behavior event.preventDefault();
// Call the Voxel.requireAuth function or any other custom action Voxel.requireAuth(event);
// Additional custom actions can be added here }); }); });