關於爲什麼下列跳房子不做以下工作的任何想法?我們希望用戶能夠點擊按鈕開始遊覽。 非常感謝!跳房子按鈕單擊不工作
<html>
<head>
<title>My First Hopscotch Tour</title>
<link rel="stylesheet" href="css/hopscotch.css">
</head>
<body>
<h1 id="header">My First Hopscotch Tour</h1>
<div id="content">
<p>Content goes here...</p>
</div>
<button id="myBtn">Click Me</button>
<script>
var tour = {
id: "hello-hopscotch",
steps: [
{
title: "My Header",
content: "This is the header of my page.",
target: "header",
placement: "bottom"
},
]
};
$("#myBtn").click(function(){
hopscotch.startTour(tour);
});
</script>
<script src="js/hopscotch.js"></script>
</body>
</html>
代碼改進縮進。 –