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
精彩评论