Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Uncaught TypeError: Cannot read property 'top' of undefined #170

Closed
md-ataur opened this issue Dec 7, 2018 · 4 comments
Closed

Uncaught TypeError: Cannot read property 'top' of undefined #170

md-ataur opened this issue Dec 7, 2018 · 4 comments

Comments

@md-ataur
Copy link

md-ataur commented Dec 7, 2018

Thanks for your plugin, it is really great.

Issue description:
The problem is when i click the menu then showing this message
"Uncaught TypeError: Cannot read property 'top' of undefined"

Demo Link: http://onlivetech.com/

Thanks and Regards

@davist11
Copy link
Owner

davist11 commented Dec 7, 2018

It doesn't look like you have the navigation set to jump to specific sections on the page. You need to use hashes and ids

<ul>
    <li><a href="#team">Team</a></li>
    ....
</ul>

<div id="team">
    ...
</div>

@md-ataur
Copy link
Author

md-ataur commented Dec 7, 2018

Hi,
I added hash on the menu id for specific sections. It's ok when i set the hashes on menu id but when i click the blog menu then same problem is showing.

Demo Link: http://onlivetech.com/blog/

Thanks

@davist11
Copy link
Owner

davist11 commented Dec 7, 2018

I think you are misunderstanding how the plugin works. If all of your links are going to be external, then there isn't a point to using the plugin. It's for jumping between sections on a single page: http://davist11.github.io/jQuery-One-Page-Nav/

@davist11 davist11 closed this as completed Dec 7, 2018
@md-ataur
Copy link
Author

md-ataur commented Dec 7, 2018

Now I got it
Thank you so much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants