I have sidebar block, which has position fixed.
I need to fix overlapping of the footer by this sidebar when I scroll browser's window.
I tried to change the positioning of sidebar to absolute
, calculate conditions of movement and move it on scroll event of window, but it does not work correctly when I scroll fast.
How can I fix this, problem when scrolling the window fast, or, suggest if there is a js plugin for this?
Update:
Fiddle : http://jsfiddle.net/c863E/1/
(Footer should not be overlapped by sidebar)
I've used the following plugin for this exact task before: http://www.profilepicture.co.uk/sticky-sidebar-jquery-plugin/
It worked perfectly.
Also here is the GitHub project: https://github.com/pmp/jQuery-Stickybox
The general term for the solution you need is a sticky sidebar. There are various jQuery plugins and tutorials with varying techniques for achieving this effect. A Google search for "jquery sticky sidebar" will reveal plenty.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.