Mike Young
Mike Young

Reputation: 321

Animated Header navigation shrink after scroll

I am using this repo for an animated header:

https://github.com/codrops/AnimatedHeader

The only problem I'm having is that it shrinks around 300pixels of scrolling where as I need it to active after scrolling at around 150px. There where two values in the js which I reduced drastically but it did not make any difference. Is anyone able to advise how can to change it please?

Thanks in advance :)

Upvotes: 0

Views: 627

Answers (3)

Waqar
Waqar

Reputation: 848

open file cbpAnimatedHeader.min.js

find a=300 and change it to a = 150

That's it

Upvotes: 0

rssfrncs
rssfrncs

Reputation: 1011

Looking at the JavaScript file cbpAnimatedHeader.js it seems that the variable changeHeaderOn sets the breakpoint for animating the header.

Make sure you change this value in the minified javascript file or change the reference in the html page to the uniminified version!

Upvotes: 0

Vlad
Vlad

Reputation: 901

By looking at the code it seems that this variable changeHeaderOn = 300; needs to be changed in order to accommodate your preference.

Upvotes: 1

Related Questions