LikaloLLC / tourguide.js

A simple, lightweight, clean and small library for creating guided product tours for your web app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tourguide.ActionHandler is not a constructor

xmedia-nl opened this issue · comments

I get an error when trying to create an ActionHandler.

Uncaught TypeError: Tourguide.ActionHandler is not a constructor
at :1:1

const steps = [
{
				content: "some text",
				title: "some title",
				selector: ".account-subitem.my-library",
				step: 6,
				actions: [{
						"label": "Invite members",
						"action": "click",
						"target": ".account-subitem.team"
					},
					{
						"label": "Share",
						"action": "link",
						"href": "/my-account/listmanager/library/"
					}
				]
			}
]
tg = new Tourguide({
			steps: steps,
			actionHandlers: [
				new Tourguide.ActionHandler(
					"link",
					function(event, action, context) {
						event.preventDefault();
						window.location = action.href;
					}
				),
				new Tourguide.ActionHandler(
					"click",
					function(event, action, context) {
						event.preventDefault();
						jQuery(action.target).trigger('click');
					}
				)
			]
		})

I'm obviously doing something wrong.. Anyone care to point me in the right direction?