How to fade Header, Top tabs and footer tabs on scroll


Hi everyone! I am new to Ionic and Angularjs and having an issue please help me to solve it. I have header then tabs-top as subheader then content and tabs at bottom.Here is the codepen demo.

I want to fade header , sub-header and footer on scroll and all shown back when scroll back to top.
I have seen the same issue like mine How to hide the header and tabs on scroll
but it has some problems that it hides on scroll and as scroll stops bars shown back.

I want to fade header and footer and subheader may also fade or it should move to top.

Thank you for reading my problem.

How to hide the header and tabs on scroll

why no one is replying to this post???


You could use the solution of the post you mentioned, but remove the part which fade ins the bars again.
Hang on the onscroll event to get scrollposition.
An easy way is to use ionic scroll handling.
You can add a on-scroll-complete attribute to your ion-content.
This could handle a function which gets the scrollposition if scrolling finished -> if = 0 or with a little bit tolerance 30 -> show bars.
To get scroll position you can use this:$ionicScrollDelegate/

Try it and if you does not get along this problem -> make a codepen and someone will help you again.



Here is the solution to your problem.