I want a sidebar that is affixed. It is going up and down on some positions when scroll. The problem is that when I am at the bottom and want to go back up, it's stuck at the bottom and pops to the top when im at the top of the beginning of the affix. Here some code:
CSS
.aside-affix{
background:#eeeeee;
padding:15px;
width:500px;
z-index:74;
}
.affix{
margin-right: 24px;
margin-top:15px;
}
.affix-bottom{
position: absolute;
margin-right:19px;
right:0;
}
.affix-top{
margin-right:19px;
right:0;
}
HTML
<div class="col-sm-4 col" id="scrollspy">
<aside class="aside-affix affix" data-spy="affix" data-offset-top="490" data-offset-bottom="818" id="affix">
<p>Dit is een pagina met alle projecten. Deze tekst verschijnt in de sidebar aan de rechterkant.</p>
<p>Donec at elementum odio. Vestibulum eleifend turpis diam. Phasellus id ante pharetra, cursus purus venenatis, tempus lacus. Curabitur a eleifend lorem. Pellentesque erat justo, ultrices quis mi id, feugiat imperdiet sapien. Ut aliquet orci urna, convallis fringilla risus pharetra ut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et congue velit. Vivamus eget lectus arcu. Donec eu porttitor erat. Suspendisse potenti. Vestibulum dignissim leo luctus nibh egestas, nec blandit tortor feugiat. Praesent at ornare velit. Aliquam gravida metus velit, in pellentesque mi iaculis sed. Ut rutrum semper elementum.</p>
</aside>
</div>