How to make fixed sidebar and header?

Hi all. Please share with clean code for Sidebar and Header.
TK:
Sidebar: sidebar skalitsa to the end of their detention, and fixed. and as soon up sidebar is released to the beginning of the content.
Header: When scrole down hiding in the top smoothly(not instantly) and it appears when scrole the top.
July 9th 19 at 10:14
1 answer
July 9th 19 at 10:16

Find more questions by tags CSSHTMLJavaScriptjQuery