I am creating a tour using Hopscotch and I would like to create the ability for the user to take or exit a tour of the page once they hit it.
I am trying to create a onClose function but I am getting stuck.
var tour = {
id: "businesstour-hopscotch",
steps: [
{
title: "Welcome",
content: "This is the new business profile page, click next to have a quick tour.",
target: document.querySelector('#companyname'),
placement: "right",
xOffset: -380,
yOffset: 52,
onClose: function() {
window.location = '/';
}
},
etc etc and it's not working. Not showing a button to end the tour either. Any ideas would help!