F
F
Faber Estello2015-11-13 10:26:42
JavaScript
Faber Estello, 2015-11-13 10:26:42

Why is the one-page navigation code not working?

Tell me, please, what am I doing wrong, why the last link to the section does not work (no matter how many section links)?
link to task in jsbin

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2015-11-13
@senselessV7

Your href in the link does not match the data-section parameter:
<section class="section" data-section="go">

D
Dmitry Pavlov, 2015-11-13
@dmitry_pavlov

in the line dirPos = dirSection.offset().top;
fails with the error "Cannot read property 'top' of undefined"
i.e. dirSection.offset() returns undefined

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question