|
|
|
@ -19,12 +19,17 @@ var customSearch; |
|
|
|
|
// button
|
|
|
|
|
const $postsBtn = $('.menu .active'); |
|
|
|
|
const $topBtn = $('.s-top'); |
|
|
|
|
const $titleBtn = $('h1.title', '#header-meta'); |
|
|
|
|
console.log($titleBtn); |
|
|
|
|
// anchor
|
|
|
|
|
const $bodyAnchor = $('.l_body'); |
|
|
|
|
// action
|
|
|
|
|
if ($postsBtn.length && $bodyAnchor) { |
|
|
|
|
$postsBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); }); |
|
|
|
|
} |
|
|
|
|
if ($titleBtn.length && $bodyAnchor) { |
|
|
|
|
$titleBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); }); |
|
|
|
|
} |
|
|
|
|
if ($topBtn.length && $bodyAnchor) { |
|
|
|
|
$topBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); }); |
|
|
|
|
} |
|
|
|
|