鼠标经过展开效果

<script type="text/javascript">
            $(function() {
                $('#accordion > li').hover(
                    function () {
                        var $this = $(this);
                         var id = $this.attr("id");
                        $this.stop().animate({'width':'783px'},500);
                        $("#accordion > li:not(#"+id+")").animate({'width':'115px'},500);

                    },
                    function () {
                        $("#accordion > li").animate({'width':'337px'},500)
                    }
                );
            });
        </script>

你可能感兴趣的:(效果)