Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 802 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 802 Bytes

squeezingHeader

A jQuery plugin for squeezing your header on scroll down.

Demo's here

And IRL

Usage

To make your header squeezable, simply call squeezingHeader() on your header element passing along all the contained elements' final positions:

var elementPositions =
    [
      {
        element: '.header .title',
        mins: {
          fontSize: 10,
          height: 10
        }
      },
      {
        element: '.header .menuBtn',
        mins: {
          marginRight: -100
        }
      }
    ];

$('.header').squeezingHeader(elementPositions);

For a working example, check out demo.html