-2

IE8 エラー:

Message: Expected '}'

Line: 59

行: 2 番目の例が配置されている 59 ----- > ( $magicLineTwo.stop().animate({ )

    $("#example-two li").find("a").hover(function() {
        $el = $(this);
        leftPos = $el.position().left;
        newWidth = $el.parent().width();
        $magicLineTwo.stop().animate({         
            left: leftPos,         
            width: newWidth
            backgroundColor: $el.attr("rel")
        });

JavaScript コード全体は、こちらの JSFiddleにあります。

誰かが私を助けてくれれば幸いです。何週間もこれで立ち往生しています。

4

2 に答える 2

3

さて、あなたはここでコンマを逃しました:

    left: leftPos,
    width: newWidth
    backgroundColor: $el.attr("rel")

次のようになります。

    left: leftPos,
    width: newWidth,
    backgroundColor: $el.attr("rel")
于 2013-10-01T21:54:41.423 に答える
2

ここにカンマを入れてください:

left: leftPos,
width: newWidth
               ^
backgroundColor: $el.attr("rel")
于 2013-10-01T21:56:13.470 に答える