Javascript jQuery跨浏览器问题

Javascript jQuery跨浏览器问题,javascript,jquery,internet-explorer-6,cross-browser,Javascript,Jquery,Internet Explorer 6,Cross Browser,我有这段代码在所有浏览器中都能很好地工作,但不是IE6,我不知道为什么,有人能解释一下吗 $("#handle").toggle( function () { $('#login').animate({ marginTop: '0', }, 1000); $("#handle").addClass('opened'); return false; }, function ()

我有这段代码在所有浏览器中都能很好地工作,但不是IE6,我不知道为什么,有人能解释一下吗

$("#handle").toggle(    
    function () {
        $('#login').animate({
            marginTop: '0',
        }, 1000);
        $("#handle").addClass('opened');
        return false;
    }, 
    function () {
        $('#login').animate({
            marginTop: '-280',
        }, 1000);
        $("#handle").removeClass('opened');
        return false;
    }
);

在传递给
animate()
的对象文本中有尾随逗号。IE不支持这一点。这应该起作用:

$('#login').animate({
  marginTop: '0' //No comma, can you see it?
}, 1000);
是的,我想我能

邪恶的逗号抓住了你

marginTop: '0',  // remove comma

尾随逗号在IE中是一个很大的禁忌。

也应该是吗

"-280px" // added "px"

IE6只是加载页面上的错误
"-280px" // added "px"