A modern browser is required for security, reliability, and performance. Contact us.

Jul 16 2012

Introducing stickyMojo

stickyMojo is a contained sticky sidebar plugin for jQuery. It is lightweight, fast, flexible and compatible with Firefox, Chrome, Safari, and IE8+. It will degrade gracefully in older versions of IE.

After looking around for a contained fixed position sticky sidebar for our blog we found that there were few options that handled all of the intricacies of cross-browser support, window resizing, and smoothness.

One of the solutions that many people have come up with is to have the sidebar be positioned absolutely, then animate the top property. Although this solution worked, it looked jankey compared to fixed position element.

The problem with a simply “fixed” positioned element is that it doesn’t react well to a scroll or window resize. In many cases the sidebar will overlap elements such as the footer or content area. Generally this is not the intended effect.

Luckily we’ve got stickyMojo.

—Aaron Snyder