ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

How to change hash scrolling margin height #26

Closed gtparkins closed 10 years ago

gtparkins commented 10 years ago

Im looking for a way to not have my navigation covering the headers when it scrolls because of its fixed height. Should I just add top margin to the page when slicknav is present?

ComputerWolf commented 10 years ago

@gtparkins, if you are using SlickNav as a fixed element at the top of the page, you can use jQuery to calculate the height of the SlickNav menu when closed and add that as padding or margin to the top of the page. This should prevent any overlap.

ComputerWolf commented 10 years ago

I think I misunderstood your question the first time. I assume you are actually talking about the SlickNav overlapping when clicking an anchor link. To solve this you can use the Smooth Scroll jQuery plugin and use the "offset" option to set the difference because of the navigation.

gtparkins commented 10 years ago

Correct, thanks for the suggestion! Smooth Scroll will work perfect!

On Tue, Apr 1, 2014 at 1:35 PM, Josh notifications@github.com wrote:

Reopened #26 https://github.com/ComputerWolf/SlickNav/issues/26.

Reply to this email directly or view it on GitHubhttps://github.com/ComputerWolf/SlickNav/issues/26 .

Garren Parkins 423.329.1530 gtparkins@gmail.com

gtparkins commented 10 years ago

And thanks for Slicknav!

On Tue, Apr 1, 2014 at 1:36 PM, Garren Parkins gtparkins@gmail.com wrote:

Correct, thanks for the suggestion! Smooth Scroll will work perfect!

On Tue, Apr 1, 2014 at 1:35 PM, Josh notifications@github.com wrote:

Reopened #26 https://github.com/ComputerWolf/SlickNav/issues/26.

Reply to this email directly or view it on GitHubhttps://github.com/ComputerWolf/SlickNav/issues/26 .

Garren Parkins 423.329.1530 gtparkins@gmail.com

Garren Parkins 423.329.1530 gtparkins@gmail.com