mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
fix: 當主頁設置不顯示頂部圖時,js報錯的bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.4.0-b3",
|
"version": "3.4.0-b4",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
* 首頁top_img底下的箭頭
|
* 首頁top_img底下的箭頭
|
||||||
*/
|
*/
|
||||||
const scrollDownInIndex = () => {
|
const scrollDownInIndex = () => {
|
||||||
document.getElementById('scroll-down').addEventListener('click', function () {
|
const $scrollDownEle = document.getElementById('scroll-down')
|
||||||
|
$scrollDownEle && $scrollDownEle.addEventListener('click', function () {
|
||||||
btf.scrollToDest(document.getElementById('content-inner').offsetTop, 300)
|
btf.scrollToDest(document.getElementById('content-inner').offsetTop, 300)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user