<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://unpkg.com/driver.js/dist/driver.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/driver.js/dist/driver.min.css">
</head>
<body>
<input id='create-post1' type="" name="" οnfοcus='driver("create-post1")'>
<input id='create-post2' type="" name="" οnfοcus='driver("create-post2")'>
<input id='create-post3' type="" name="" οnfοcus='driver("create-post3")'>
<div id="run-element-without-popover" οnclick="driver1()">
popover
</div>
<script type="text/javascript">
function driver(id){
const driver = new Driver();
driver.highlight(`#${id}`);
}
function driver1(){
const driver = new Driver({
opacity: 0,
closeBtnText: '关闭'
});
driver.highlight({
element: '#run-element-without-popover',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
position: 'button', // can be `top`, `left`, `right`, `bottom`
}
});
}
</script>
</body>
</html>