views:

168

answers:

2

I wanna move a div block to the top, so I coded like this:

CSS part:

.movingPart{
margin-top:80px;
}

jQuery part:

$(document).ready(function() {

$('#btn').click(function() {


    $('.movingPart').animate({
        "margin-top":'0px'

    });


});

});

it works perfectly in chrome, but doesn't move a little in firefox, why???

thanks in advance

A: 

see http://stackoverflow.com/questions/481288/jquery-animate-issues

J-16 SDiZ
thx for quoting
EthanZ6174
+1  A: 

The jQuery docs indicate that you should use camelCase for properties when using animate.

Note that properties should be specified using camel case, e.g. "marginLeft" instead of "margin-left."

tvanfosson