Skip to content

Commit

Permalink
Fix : 導覽結束時頁面沒有返回頂部
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiang511 committed Feb 24, 2024
1 parent 94b4e9a commit 81b0863
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions newsite/js/driver.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const driver = window.driver.js.driver;

// const driverObj = driver();

// driverObj.highlight({
// element: "#test",
// popover: {
// title: "Title",
// description: "Description"
// }
// });

const driverObj = driver({
showProgress: true,
showButtons: ['next', 'previous', 'close'],
Expand All @@ -28,11 +26,8 @@ const driverObj = driver({
{ element: '.bx-menu', popover: { title: '側選單', description: '其他功能 例如:"個人成就","網站開源程式碼', side: "left", align: 'start' } },
{ element: '#chart', popover: { title: '目前網站瀏覽次數', description: '感謝你的貢獻!', side: "left", align: 'start' } },

{ element: '#track', popover: { title: '介紹完畢', description: '盡情瀏覽網站內容把! 希望你們會喜歡!</br>我是Xiang 我們排行榜上見! ', side: "left", align: 'start' } },


{ element: '#sys', popover: { title: '介紹完畢', description: '盡情瀏覽網站內容把! 希望你們會喜歡!</br>我是Xiang 我們排行榜上見! ', side: "left", align: 'start' } },
],

onDestroyStarted: () => {
if (!driverObj.hasNextStep() || confirm("確定要跳過導覽?")) {
driverObj.destroy();
Expand All @@ -49,5 +44,4 @@ const driverObj = driver({
}
},
});
// debug
driverObj.drive();

0 comments on commit 81b0863

Please sign in to comment.