Monday, 15 June 2015

javascript - Anchor linking when we have a persistent bar at the top -



javascript - Anchor linking when we have a persistent bar at the top -

interesting "problem". spent lot of time making our top bar persistent on site. now, whenever anchor clicked on page, browser takes me section, because there's persistent bar, section start hidden behind persistent bar :)

is there clever thought can track via jquery or something, , instead of browser default, perhaps create such scrolling anchor work "animation" , "scrolltop"? -- , take user 30px above offset of anchor, persistent bar there, intended destination visible below persistent bar?

i can command when link clicked within page, how command when users come page via anchor. thanks!

check out jquery example. smooth-scrolling shows how set offset variable can set buffer zone of top bar

javascript jquery browser scroll

No comments:

Post a Comment