mirror of
https://github.com/quantum5/correcthorsebatterystaple.git
synced 2025-04-25 02:31:57 -04:00
Separate out navbar stuff.
This commit is contained in:
parent
75947b03a5
commit
ab4b249aa6
14
src/app.js
14
src/app.js
|
@ -1,15 +1,3 @@
|
|||
import './app.scss'
|
||||
import $ from 'jquery/dist/jquery'
|
||||
import 'bootstrap/js/dist/util'
|
||||
import 'bootstrap/js/dist/scrollspy'
|
||||
import './clipboard'
|
||||
|
||||
$(() => {
|
||||
$('#nav-anchors').find('a.nav-link').click(function () {
|
||||
const $dest = $($(this).attr('href'))
|
||||
$('html, body').animate({
|
||||
scrollTop: $dest.offset().top - 72
|
||||
}, 500)
|
||||
return false
|
||||
})
|
||||
})
|
||||
import './navbar'
|
||||
|
|
13
src/navbar.js
Normal file
13
src/navbar.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import $ from 'jquery/dist/jquery'
|
||||
import 'bootstrap/js/dist/util'
|
||||
import 'bootstrap/js/dist/scrollspy'
|
||||
|
||||
$(() => {
|
||||
$('#nav-anchors').find('a.nav-link').click(function () {
|
||||
const $dest = $($(this).attr('href'))
|
||||
$('html, body').animate({
|
||||
scrollTop: $dest.offset().top - 72
|
||||
}, 500)
|
||||
return false
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue