<ul data-uk-scrollspy-nav="{closest:'li', smoothscroll: {offset: 220}}" data-uk-sticky="{media:768, top:130, boundary: ''}" style="margin: 0px;">
offset
feature to tell where exactly the links should scroll to.<ul>
<li>
<a href="#g-feature" data-uk-smooth-scroll="{offset: 120}">Section 1</a>
</li>
<li>
<a href="#g-subfeature" data-uk-smooth-scroll="{offset: 120}">Section 2</a>
</li>
<li>
<a href="#g-maintop" data-uk-smooth-scroll="{offset: 120}">Section 3</a>
</li>
<li>
<a href="#g-additional" data-uk-smooth-scroll="{offset: 120}">Section 4</a>
</li>
</ul>
#anchor {
display: block;
position: relative;
top: -150px;
visibility: hidden;
}
a[#g-extension] {
margin-top: -150px;
display: inline-block;
vertical-align: top;
}
<span style="position: relative;"><a style="position: absolute; top: -140px;" name="platform"></a></span>
(function($) {
$(document).ready(function() {
$(".g-main-nav .g-toplevel").attr('data-uk-scrollspy-nav', '{closest:".g-menu-item-container", smoothscroll:{offset: 120}}');
});
})(jQuery);
(function($) {
$(document).ready(function() {
$(".g-main-nav .g-toplevel").attr('data-uk-scrollspy-nav', '{closest:".g-menu-item-container", smoothscroll:{offset: 120}}');
});
})(jQuery);
Ivo Valkov wrote:
Hi Lisa,
You cannot have smooth scroll (and offset) with your current setup (with these URLs).
Here, have a look at this video that I recorded for you. It shows everything in details.
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »