background preloader

Animation

Facebook Twitter

Tips

Outils. JsAnim - Free JavaScript Animation Library. Creating a HTML Compatible jQuery Typewriter. Before Reading… Before reading this tutorial you may want to check out the previous post ‘jQuery Typewriter Revisited‘ which explains the code that this tutorial is based on. The requests for my jQuery Typewriter to allow HTML within the text have been flooding in, and as I said I had previously though it to be impossible, but it hit me earlier today that it is possible. Let’s take a look at a demo first. At first glance it looks the same as the old jQuery typewriter, but you may have noticed that certain words in the first few lines were different colors. This was done using a <span> tag. If you aren’t familiar with how HTML & the typewriter works you’d be forgiven for thinking: “What’s so special about that?”

HTML & jQuery Typewriter… The Problem The main problem is that because the jQuery typewriter uses substr (or cuts) the text string to only show so much of it, it will always end up cutting the HTML tag too. HTML & jQuery Typewriter… The Solution So, the solution? That’s It. Welcome to Jarallax.com. Spritely.net. Mouseover on sprites with the plugin "spritely" Why does jQuery spritely animation plays an extra frame on second mouseenter. jQuery & CSS Sprite Animation Explained In Under 5 Minutes. Today we’re going to take a look at sprite animation. There’s been a lot of talk this year about the future of technologies like Adobe’s Flash and for good reason – with the performance of JavaScript frameworks having come so far since they were first conceived, it’s now possible to create equally as powerful animations and effects without needing to use any third party plugins.In today’s screencast I’m going to show you what a sprite is and just how easy it can be to create an entire animated scene using jQuery, CSS & Sprites.

You’ll also get to see some pretty cool out-in-the-wild examples of jQuery Sprite Animation in action, so why not check it out in my screencast below! Demos and text are available for anyone that wants to read/see them in the rest of the post. View Demo Download Source Today’s animations are created using a really useful jQuery plugin called Spritely. You can download the Spritely plugin here. Basic Example using Pan() The jQuery The HTML The CSS And thats it!. Documentation | Spritely. Spritely is a simple plugin with only two key methods, sprite() and pan() both of which simply animate the background-image css property of an element. The difference between the two is that a 'sprite' image contains two or more 'frames' of animation, whereas a 'pan' image contains a continuous image which pans left or right and then repeats.

Typically, in either case, you would use a png file (with or without transparency) for this. You might wish to use a transparent gif for Internet Explorer 6, though it probably won't look as good. Your html elements must already be the correct size you want the sprite to appear, but the background image will typically be larger than the html element, and the spritely methods reposition the background image within the html element. For documentation in languages other than English, please see Unoffical Documentation. Please note: there is a problem with the current version of Mobile Safari on the iPad Quick start What's new in version 0.6?

For example, Spritely - Un plugin jQuery pour réaliser des animations facilement. Spritely est une librairie d'animation jQuery vous permettant de réaliser des backgrounds animés, et plus encore ! Vous connaissez sans doute le plugin jAni ou encore la librairie $fx qui permettent de réaliser des backgrounds animés.

Et bien voici une nouvelle dans le monde des animations: Spritely. Spritely vous permettra de réaliser facilement des animations sans flash, à l'aide de sprite et de javascript. Grâce à la puissance de Javascript, vous pourrez facilement interagir avec l'utilisateur via les clicks de souris, clavier etc. Voici un exemple d'utilisation de la librairie, pour animer l'oiseau: Dans un premier temps, il faut concevoir l'image sprite: Votre sprite devra contenir la séquence des mouvements de votre oiseau.

Initialisez la div qui contiendra votre oiseau: Ajoutez une couche de CSS: 1. 2. position: absolute; 3. width: 180px; 4. height: 180px; 5. background: transparent url(sprite-oiseau.png) top left no-repeat; Puis initialisez l'animation avec le plugin: 2. Site Officiel.

Site

SpriteOnHover (sprite on hover) - jQuery plugin. SpriteOnHover (Sprite on Hover) spriteOnHover (Sprite on Hover) is a lightweight jQuery plugin designed to animate your sprite sheets on hover (duh). It turns this: Into this (hover this!) : More demo! Download Download it here (0.2.5), you’ll get the plugin, examples and demos, if you need documentation, check out the plugin’s repository on github or just keep reading this post. Simplest Usage $('#yourSprite').spriteOnHover(); This will make the plugin work this the default parameters, which points to this: The usage is just hovering the sprite, you set $('#yourSprite').spriteOnHover(); and the element '#yourSprite' will be turned into a hoverable sprite, no need to use the mouseover, mouseenter, mouseleave or hover events of jquery.

Demo & Examples Check out the plugin demos The CSS Attention: The spriteOnHover jquery plugin will autodetect how many frames your sprite has, based on the orientation parameter, but it’s crucial that every frame has the exactly same size as the others. The parameters.