0

以下の解決策を検索しました。jQueryを使用してリスト項目をアニメーション化しようとしています。これが私のスクリプトです:

$(document).ready(function() {
    $('li').hover(function() {
        $(this).animate({paddingLeft: '+=15px'}, 200);
    },
    function() {
        $(this).animate({paddingLeft: '-=15px'}, 200);
    });
});

CSSは次のとおりです。

ul {
    font-family: Garamond, serif;
    list-style-type: square;
}

スクリプトを正しく呼び出していることを確認しました。

誰でも私を助けることができますか?

4

1 に答える 1