Fix anchors being hidden under fixed navbar issue
This commit is contained in:
parent
2c053c93b2
commit
8bc65f6d4b
|
@ -109,9 +109,19 @@ window.unbindEvents = ->
|
|||
$(document).unbind('scroll')
|
||||
$(document).off('scroll')
|
||||
|
||||
window.shiftWindow = ->
|
||||
scrollBy 0, -50
|
||||
|
||||
document.addEventListener("page:fetch", unbindEvents)
|
||||
|
||||
# Scroll the window to avoid the topnav bar
|
||||
# https://github.com/twitter/bootstrap/issues/1768
|
||||
if location.hash
|
||||
setTimeout shiftWindow, 1
|
||||
window.addEventListener "hashchange", shiftWindow
|
||||
|
||||
$ ->
|
||||
|
||||
# Click a .one_click_select field, select the contents
|
||||
$(".one_click_select").on 'click', -> $(@).select()
|
||||
|
||||
|
|
Loading…
Reference in New Issue