background preloader

Hide your header on scroll - Headroom.js

Hide your header on scroll - Headroom.js
Downloads Note: the sizes shown are after gzipping. What's it all about? Headroom.js is a lightweight, high-performance JS widget (with no dependencies!) that allows you to react to the user's scroll. Why use it? Fixed headers are a popular approach for keeping the primary navigation in close proximity to the user. Large screens are usually landscape-oriented, meaning less vertical than horizontal space. Headroom.js allows you to bring elements into view when appropriate, and give focus to your content the rest of the time. How does it work? At it's most basic headroom.js simply adds and removes CSS classes from an element in response to a scroll event: Relying on CSS classes affords headroom.js incredible flexibility. Usage Using headroom.js is really simple. With plain JS Include the headroom.js script in your page, and then: var myElement = document.querySelector("header");var headroom = new Headroom(myElement);headroom.init(); With jQuery/Zepto $("#header").headroom(); With AngularJS Options

How to Create a CSS3 Wheel Menu There's no better way to learn CSS3 than to get your hands dirty on an actual project and that's exactly what we're going to do. I'm going to teach you how to create an awesome, layered CSS3 wheel menu using a few beginner to advanced CSS techniques. So break out your favorite text editor or IDE and let's get started on some CSS3 magic! Today you'll be learning how to create the candy cane teardrop out of the many different styles and color variations available. Note: Support for IE is limited at the moment. The Video Tutorial We're offering this tutorial in two different formats today: A video as well as a full written tutorial below. The Written Tutorial The step by step written tutorial is below. Step 1: The Layers The first thing we want to do is create some layers that will overlap each other and stay in place while using as little code as possible. The Code: As you can see the code is pretty straight-forward. Now we'll want to add some styling to each layer one by one. #menu-wrap:

medialize/jQuery-contextMenu sydcanem/bootstrap-contextmenu

Related: