BTW, I have a quesiton:
$(document).ready(function() {
$('.buttons a')
.mouseover(function() {
var index = $('.buttons a').index(this);
$(this).css({backgroundPosition: '-' + 200 * index + 'px -0'})
$(this).stop().animate({backgroundPosition:"(-" + 200 * in
Thanks so much!
I don't really understand the logic behind it. The .css() set the
value to 200px but why I need to use the same value in anumate
(200px) ? By the way, .css has a bigger priority than animate?
Thanks again! I appreciate your help!
On Jul 11, 3:51 am, Karl Swedberg wrote:
> You co
You could chain a .css() to it. Set the x axis first with .css() and
then the y axis with .animate() :
$(this)
.css({backgroundPosition: '200px 0'})
.animate({backgroundPosition:"(200px -50px)"}, {duration: 600})
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.c
3 matches
Mail list logo