Background Animation Plugin

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
679 views

Adds the ability to do background-position animations to jQuery 1.2 and newer.
How to use:

  $('#background').animate({backgroundPosition: '10% 250px'}); 

Example:

  $('#background')
   .click(function(){
       $(this)
            .animate({backgroundPosition: '500px 150px'})
            .animate({backgroundPosition: '-20px 250px'})
        ;
   }); 

Known Issue

Due to a bug in FF 2.0, you have to set your (initial) background-position inline:

  <div style="background-position: 10px 20px"></div> 

Offcurse you can achieve this with JavaScript (jQuery), too:

 $('#background').css({backgroundPosition: '10px 20px'});  

If you don´t set the inline-Style the script will degrade gracefully in FF 2.

Demo: http://www.protofunc.com/scripts/jquery/backgroundPosition/
Download: http://plugins.jquery.com/files/jquery.backgroundPosition.js_7.txt
Source: http://www.protofunc.com/scripts/jquery/backgroundPosition/

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. jAni – Jquery Animation for Background Images jAni is a simple plugin for jQuery which allows you...
  2. Ajax Manager : jQuery Plugin Ajax Manager helps you to manage AJAX requests and responses...
  3. Lights Out – Dimming – Covering Background Content with jQuery This is a quick and easy approach that tackles a...
  4. jQTouch Cell Phones Animation using Jquery A jQuery plugin for mobile web development on the iPhone,...
  5. jParallax – Stunning Animation Effects jParallax has had a major overhaul in readiness to be...

Do you like this post?

Email:     

Tags: , , , , ,

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG