-2

最後に、必要な適切な jquery スクリプトが見つかった場合。

しかし、効果を変更したいのですが、今は左上隅から来ており、左にスライドさせたいと思っています。

これはコードです:

    <script type="text/javascript">
    $(document).ready(function() { 
        //add the click event to each element with the toggle class 
        $('a.toggle').click(function(){
            if ($(document).data("toggle-id")) {
                //item was already selected, hide it
                $("div.toggle#" + $(document).data("toggle-id")).hide(1000);
            }
            //save the new id for later, then show it
            $(document).data("toggle-id", $(this).text().toLowerCase());
            $("div.toggle#" + $(document).data("toggle-id")).show(1000)
       });
    });
</script>
4

1 に答える 1