`
laoye4536
  • 浏览: 9305 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

JQuery 模拟手机界面 手风琴菜单特效

    博客分类:
  • php
 
阅读更多
<script type="text/javascript">
//<![CDATA[
                $(document).ready(function() {
                        // Store variables
                        var accordion_head = $('.accordion > li > a'),
                                accordion_body = $('.accordion li > .sub-menu');
                        // Open the first tab on load
                        accordion_head.first().addClass('active').next().slideDown('normal');
                        // Click function
                        accordion_head.on('click'function(event) {
                                // Disable header links
                                event.preventDefault();
                                // Show and hide the tabs on click
                                if ($(this).attr('class') != 'active'){
                                        accordion_body.slideUp('normal');
                                        $(this).next().stop(true,true).slideToggle('normal');
                                        accordion_head.removeClass('active');
                                        $(this).addClass('active');
                                }
                        });
                });
  //]]>
  </script>
 
jQuery手风琴菜单(模拟手机界面) - javascript代码库 - 云代码http://yuncode.net/code/c_53a707aed822c61
 
 
jQuery手风琴菜单(模拟手机界面)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics