Background position plugin for jQuery

I am again up with short but new article. That is about jQuery’s plugin, Background position plugin. jQuery is a great library for this type of task but out of the box, it can’t animate background position properly because of the need to animate two values instead of just one (too bad not all browsers implemented the non-standard background-position-x and -y like Internet Explorer).

This plugins the ability to do background-position animations to jQuery 1.2, and later versions.
$('#background').animate({backgroundPosition: '150px 250px'});

Download the plugin from here,

It will ask you to save in text file but instead save it as, “bgplugin.js”. (including quotes).

You can see it’s use >HERE< for animating a navigation bar using jQuery.

Hope this short information was useful.

You can leave a response, or trackback from your own site.

Leave a Reply