atlMapper
atlMapper

Reputation: 764

jquery scrollTo offsetTop

I'm using jquery ScrollTo wonderfully but want to use the "offset top" add-on, has anyone set it up? I'm unsure of how to properly use it

$('#aAbout').click(function about() {
   $.scrollTo('#dAbout', 500, offsetTop: 10px);
});

Upvotes: 0

Views: 4216

Answers (1)

Blazemonger
Blazemonger

Reputation: 92893

That isn't valid JavaScript syntax. Perhaps you meant:

$('#aAbout').click(function() {
    $('#dAbout').scrollTo({
        duration: 500, 
        offsetTop: '10px'
    });
});

Upvotes: 1

Related Questions