Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87530

cannot get the nav anchor links to smooth scroll

$
0
0

http://callmenick.com/lab-demos/7-single-page-smooth-scroll

 

Hi, the link above is the tutorial I was following to see if I could modify a page I'm trying to build to smooth scroll.

I have my nav links set up the same, all jQuery and scripts for this piece in place...

 

Do the anchor nav links "know" to smooth-scroll down to appropriate section if the section is an id with the same name? Is that how it makes the association between the two elements? If not, am I to put my cursor by the section and create an anchor where I give it a name (the standard, typical way)? - It's just that the tutorial markup shows no further code next to the section, and that one works - where mine does not, yet.

Rough example of what I mean...

 

<div id="nav-anchor">

            <nav>

                <ul>

                    <li><a href="#about">About</a></li>

                </ul>

                </nav></div>

in HTML:

<section id="about"><h2>About</h2><p>text here</p></section>

 

Another question... I had div classes for each segment as you scroll down the page because each has unique design properties. Is it OK to simply wrap <section> tags around what were the original div containers to make it a bit more HTML 5 compliant? - Is that a reliable quick fix method, vs. having to re-write?

 

Thanks.


Viewing all articles
Browse latest Browse all 87530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>