Driver is not a function
saschaende opened this issue · comments
Sascha Ende commented
I always get the error "driver is not a function". Even on a clean html page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="haha">adfgadfgadfg</div>
<script src="https://cdn.jsdelivr.net/npm/driver.js@1.0.1/dist/driver.js.iife.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/driver.js@1.0.1/dist/driver.css"/>
<script>
const driverObj = driver({
showProgress: true,
showButtons: ['next', 'previous'],
steps: [
{ element: '#haha', popover: { title: 'Animated Tour Example', description: 'Here is the code example showing animated tour. Let\'s walk you through it.', side: "left", align: 'start' }},
]
});
driverObj.drive();
</script>
</body>
</html>
Error in Console:
Uncaught TypeError: driver is not a function
at test.php:16:23
Sascha Ende commented
Okay, i forgot:
const driver = window.driver.js.driver;