background preloader

How To Build an Animated Header in jQuery

How To Build an Animated Header in jQuery
Home > CSS, Front End Development, HTML, Javascript > How To Build an Animated Header in jQuery Why not give a little flair to your header. This tutorial will show you how to animate your header’s background image using jQuery to give your website that little extra something. What We Are Building We are going to build a header that animates it’s background. How it’s Going to Work The header background image is going to be super tall. Now that we have our background image, we will also need to create a shadow overlay image. After that it’s just a matter of animating the background image with jQuery so it scrolls. Getting Started The first thing we’re going to need is the HTML in place. Here is the HTML: The CSS We aren’t going to do anything too difficult here. Center the website Give the header a height and a background image Style and position the text within the header Create a shadow overlay Give basic style to the header and navigation bar. Here is the CSS: The jQuery Here is the jQuery:

webdev.stephband.info Download git clone github.com/stephband/jparallax Instantiation jQuery( '.parallax-layer' ).parallax( options ); What does jquery.parallax do? jParallax turns nodes into absolutely positioned layers that move in response to the mouse. With a bit of CSS you can either set up windows to see these layers through, or leave them free to roam about. The diagram on the right illustrates what jParallax does to the html: and here's a demonstration with some images: More demos demos/index.html demos/stalkbuttons.html - multiple parallax. demos/remotecontrol.html - parallax by remote control. demos/thumbnails.html - beautiful interactive thumbnails. demos/target.html - demonstrates how smoothly jParallax handles window resizing. Using jParallax The default behaviour of jParallax is to show the whole width of a layer in response to the mouse travelling the whole width of the mouseport. There are various ways to style jParallax effectively. Options Layer Options Events

jQuery to animate image from left to right Spritely.net Garage Door Style Menu Originally published on July 21, 2008 as only a jQuery technique. Now updated to include CSS3 and a combo technique which is mo' betta. A garage door style menu is where an image (the "door") slides up to reveal something behind it. We'll do this in two ways, with CSS3, and with jQuery. Then we'll combine them into a progressive enhancement way to handle it. The jQuery Method Right out of the box, jQuery provides the animate function, which allows us to morph some CSS attributes over time. Thankfully, there is a plugin to help with this, the Background-Position Animation Plugin by Alexander Farkas. View Demo Download Files 1. We are going to need three different types of images here. Notice my guides. Second, we'll need to create the garage doors which we will call the "shutters". Lastly, we need a window which will act as the garage frame. 2. Here is the menu markup: The ID on the menu will give us all the specificity we need. 3. The menu background is applied to the UL itself. 4. if (!

A jQuery responsive images plugin to help ease the transition | Jquery Picture Building an Animated Cartoon Robot with jQuery Why? Aside from being a fun exercise, what purpose does something like this have? None that's plainly obvious. View Demo Overview This project was created by layering several empty divs over each other with transparent PNGs as background images. The backgrounds were animated at different speeds using a jQuery plug-in by Alexander Farkas. The robot is comprised similarly to the background animation scene by layering several DIVs together to create the different robot pieces. The Markup <div id="wrapper"><div id="cloud-01"><div id="cloud-02"><div id="mountains-03"><div id="ground"><div id="full-robot"><div id="branding"><h1>Robot Head. The structure of the divs closely resembles our diagram. The Style The CSS for this project is just as simple as the markup. Absolute positioning is used to pull any header or paragraph text 9999px to the left of the screen. The jQuery JavaScript Disclaimer: The original script to animate the robot was horrid. Note from Chris Share On

Code a Responsive Navigation Menu Navigation menus used to be a fairly simple thing. Code up an unordered list, float it left and you’re good to go. With responsive design being all the rage these days though you’re faced with some new challenges when creating a menu design. Follow along as we start from scratch and code a simple but effective responsive navigation menu that you can easily modify and reuse in your own projects. What We’re Building If you’re the kind of person who likes to skip ahead, here’s a sneak peek at what we’re building. Demo: Click here to see and tweak it on Dabblet. The HTML Let’s jump right into this project without a bunch of unnecessary fluff. The first step is to decide on some markup. Believe it or not, this one little piece of code had my head spinning when it came time to test. Fortunately, the fix is easy, just drop in the famous html5shiv and you’re good to go (place this in the head portion of your document). Add the List Add The Sub Tag Progress Check Starter Styles Container Styles Border Fix

Starry Night by CSS-Tricks Example Paragraph Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Thin Paragraph with Pull Quote Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Another Example Paragraph Find pitcher.

jQuery Masonry 20 jQuery Plugins to Create Animating Image Effects jQuery can be very powerful and as you learn more about it you will be amazed what it is capable of doing. Today’s post is a collection of 20 jQuery plugins to create animating image effects on your site/blog. They could be very helpful to attract new visitors to stay on your page and reduce bounce rate or just for fun! Enjoy. 1. Photon : JS CSS 3D Lighting Engine Photon is a experimental JavaScript CSS 3D Lighting Engine. SourceDemo 2. Allows you to create numerous transition animation effects for webpage elements. SourceDemo 3. forkit.js : An animated GitHub ribbon An experimental animated ribbon which reveals a curtain of additional content. SourceDemo 4. Shiny Sparkle Progress bars with percentage label. Source + Demo 5. A handy JavaScript plugin for generating and animating nice & clean gauges. Source + Demo 6.: JZoopraxiscope A jQuery plugin for making animations from static images inspired in Eadweard Muybridge’s Zoopraxiscope. SourceDemo 7. SourceDemo 8. SourceDemo 9. SourceDemo SourceDemo

TodoMVC 10 Cool jQuery Animation Tutorials Here’s our collection of what we think are the 10 best jQuery Animation Tutorials you may have NOT seen before. Some of these tutorials may seem very simple but the results are fantastic and can form the base for something truly awesome. Enjoy. Related Posts: 1. It’s a cartoon themed landscape with elements which slide out to reveal additional content. SourceDemo 2. Gaya Kessler features a beautiful animation effect of puffing smoke in this tutorial. SourceDemo 3. After learning this tutorial you can understand how you can make BBC Radio 1 Zoom Tabs like effect where the mouse rolls over the image block, tabs slide up and the image zooms a little to reveal more of the picture. SourceDemo 4. This project was created by layering several empty divs over each other with transparent PNGs as background images. SourceDemo 5. On many websites you should see the images moving continuously and automatically. SourceDemo 6. SourceDemo 7. We will teach you how to do Animate image filling up by using jQuery.

Related: