Jquery

JQuery Tutorials

JQuery Resources

                                                   JQuery




ExploreJQuery.Com

 





JQuery Lightbox
 





 JQuery Accordion





JQuery Autocomplete
 

 Affiliate Marketing Recommended Products

The Affiliate Code   Profit Miracle   Maverick Money Makers
               

The Affiliate Code is an amazing training product by Michael Jones. He will teach you how he made $65,000 in one month. Michael Jones is also the creator of the extremely popular ClickBank Code.

 

Profit Miracle is a great product that will provide you with a shortcut on creating and marketing your content. This product will save you time and money with your affiliate marketing ventures

 

Maverick Money Makers was developed by millionaires and has proven to generate at least $354.97 per day from home when you are just starting out. This course is good for beginners and intermediate affiliates

Read more>>>   Read more>>>   Read more>>>
   
   
   
  Bookmark and Share
  
Jquery background image animation
      
Mar
20
Jamal Ahmad

jam05pgs

1 Comments  |   4042 Hits
Tags:   jquery animations, jquery
 

Jquery background image animation is a simple plugin for jQuery which allows you animate background images. The plugin is basically an alternative to the animated GIF but with several benefits. At first, it's always better to use an animated GIF as this format is supported by all browsers without any JavaScript code or additional markup, but the "dark side" of it is that an animated GIF allows only 256 colors and you cannot control animation in any way.


jquery background image animation

 The jAni loads a long vertical image and changes its background position with the speed you setup, giving you more control of the animation.

 

Features:

  1. Light-weight script
  2. Easy to integrate
  3. Fully customizable via CSS
  4. Works with all modern browsers

How To Use:

1.) Download jAni script. The package already contains jQuery framework.
2.) Add the following code to your <head>…</head> tag to connect the jQuery framework and jAni plugin. (Make sure paths to files are correct.)

<script type="text/javascript" src="./jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="./jani.js"></script>

3.) Add a style containing the url to your background with animation (this may be added to a separate CSS document or inside the <head>…</head> tag):

<style type="text/css">
.animation-1 {
background: url(./images/sample-animation.gif) no-repeat left top;
}
</style>

4.) Add an empty DIV which will display animation in your document:

<div id="animation-1"></div>

5.) Add the following code to your <head>…</head> tag to initialize jAni and start the animation.

<script type="text/javascript">
$(document).ready(function(){
$('#animation-1').jani({ frameWidth: 100, frameHeight: 100, speed: 100, totalFrames: 19 });
$('#animation-1').jani.play();
});
</script>

Methods:

jani.play()
Start playing animation.

jani.pause()
Pause animation.

jani.stop()
Stop animation.

Parameters:

ParametersThe table below contains a list of parameters accepted by the .jani() function.

Parameters Description
frameWidth                              Width of a single frame.
frameHeight                              Height of a single frame.
speed                              Animation speed.
totalFrames                             Total frames in the animation.
loop                  Loop an animation or not. By default, value is true.

That's it.

Demo:              Jquery background image animation

Download:       Jquery background image animation

[ Stumble Upon ] [ Facebook ] [ del.icio.us ] [ furl ] [Sphinn] [ Digg ] [ Twitter ] [ Technorati ] [ Reddit ] [ Subscribe To RSS Feeds ]

1

 
 
 
AjaxDemands

Thursday, March 25, 2010 @ 05:47 PM

 

Great post and explination, i always visit your blog to find new and interesting things about jquery. the best thing in your blog is that you explain code step by step for readers and programmers.

 
   
 
Leave your comments
 
  Your comments  

     
name  

     
  email  

     
website    

     
5 + 3 =    

     
   
     

 

 

Follow me on twitter

Follow me on facebook

 

 
   

   

affiliate_link

   

affiliate_link

   

Buy Now - PayPal

   
 
   
  JQuery Community
 
 
tissa
darrenrowse
amour
niculae
sassyqarla
summerzeet
electrostar
good-pens
kh
travelhotelworld
tunyalitk
masterartrep
dain22
bloggersun
jameslove4enao
thebeespace
majalahpatani
caryngf
wonkapromotions
jam05pgs
 
  View more bloggers   Join Community
   
   
  JQuery Popular Posts
 
 
JQuery Beautiful Image Slide Show in New Way
Good Pens, Saturday 18th April 2009

Ajax Animated Live Search
Tunya Litk, Monday 4th May 2009

Ajax instant edit
Jamal Ahmad, Friday 15th May 2009

JQuery Autocomplete with Ajax PHP and MySQL
Jamal Ahmad, Sunday 14th June 2009

Ajax fancy Captcha with JQuery and PHP
Majalah Patani, Friday 8th May 2009
   
   
  JQuery Poll
 
 

Would you like to have a website which will provide you all facilities listen music, friendship, photo sharing and blog?

 

Yes

No
I dont know
 

 
   
  JQuery Categories
 
 
JQuery
JQuery AJAX
JQuery Banners
JQuery Browsing
JQuery CSS
JQuery Forms
   
   
   

 

 

 

 

© Copyright Explore JQuery, all rights reserved
A company registered in north America, Europe, Asia and Middle East as Explore Group.