开发者

Help me move Burt Reynolds Face - jQuery

I have a problem with jQuery moving Burt Reynolds face around on the page.开发者_开发技巧

My code thus far is:

        function moveBurt() {
          $('.burt').animate('left' : "-=100px", 3000, 'linear');
        }

But this isn't working :(

PLEASE HELP ME MOVE BURT REYNOLDS FACE!!


how about -

function moveBurt() {
              $('.burt').animate({'left' : "-=100px"}, 3000, 'linear');
            }


In addition to bharlings answer, I think you should remove the "px":

   $('.burt').animate({'left' : "-=100"}, 3000, 'linear');

because JQuery will need to do arithmic. x.style.left -= 100px is not correct javascript

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜