anchors

Multipurpose WordPress Theme Forum Support
GK User
Thu Sep 03, 2015 12:11 pm
Hi,

At the moment the anchors on my page stops too far, it is skipping the title:
http://bit.ly/1NP07J9

Any solution for this?

Sincerely
User avatar
Junior Boarder

GK User
Thu Sep 03, 2015 10:45 pm
Hi,

Try to add more paddings to your sections:
Code: Select all
.frontpage .gk-desc {
padding-top: 180px;
}
User avatar
Moderator

GK User
Fri Sep 04, 2015 9:33 pm
Hi thank you,

That does work but also changes the feel and look of the site/template a bit...

Would there also be a way to just let the auto scroll stop sooner? Mabye through a javascript change or something?
User avatar
Junior Boarder

GK User
Mon Sep 07, 2015 8:21 am
Hi,

It's also possible with JavaScript, please check Quark/functions.js file and change this line (around 74)
Code: Select all
'scrollTop': target.offset().top


into:
Code: Select all
'scrollTop': target.offset().top - 200

adjust the "200" value.
User avatar
Moderator

GK User
Mon Sep 07, 2015 2:25 pm
I believe it should be changed in the functions.js of the Quark Child Theme? Atleast that is showing some result. However changing the value doesn't have any effect..... Weird side effect is that the whole gk-desc site (or box-wrap / frontpage-block box parallax-bg) is shifting up...

So this seems to work partially (atleast it is stopping sooner, but too soon now)

Also I've changed
Code: Select all
'scrollTop': target.offset().top
twice in the functions.js around line 74 and around line 68, when only one is changed into
Code: Select all
'scrollTop': target.offset().top - 200
is see no change on the website.

Or should the first code be -100 and the second one -200?
User avatar
Junior Boarder

GK User
Tue Sep 08, 2015 8:13 am
Please change only the second occurrence of this line (after the "else" part).
User avatar
Moderator


cron