Reputation: 5220
I have a three columns layout. The main column have much contents than the two others.
I have no idea how to achieve this, so any idea, jquery plugin or how to will be appreciated.
I'm using the following technologies in my current project: * jquery * twitter bootstrap 3
This is important to note the column content can be higher than the page itself, so bootstrap affix will not work.
Upvotes: 2
Views: 1149
Reputation: 39659
Have a look at this Sticky-Kit Plugin. It works absolutely fine in different use cases.
Upvotes: 3
Reputation: 782
We used margin-top to move the columns. Take a look at https://github.com/collective/collective.rcse/blob/93f47d15694c7f71635d1117342d2b84ea85bab7/collective/rcse/resources/dev/js/theme-desktop.js#L797 to see the function.
Upvotes: 1
Reputation: 1558
This stuff can be done using the jQuery and CSS. Check this out- http://jsfiddle.net/MAPNk/
Here is a small work.
These are few steps I followed:
position of sidebar
to fixed
top
to 0 (or where the div start)
.position of sidebar
to fixed
and bottom
to 0
.The above conditions are preformed when scrolling down. Similarly remove position or make it absolute on scrolling up.
Try out the rest and you will definitely find out. :)
Upvotes: 0