主页手风琴

扫码查看
本文介绍了主页手风琴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<script type="text/javascript">
	    $(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>

我在主页上使用这个accodion菜单,我想要一次选择项目菜单和页面,当我点击第二个子菜单时它会扩展1st显示第二个子菜单的菜单...

i m using this accodion menu on master page,and i want selected item menu and page at a time and when i click 2nd submenu it will expand 1st menu insteed of showing 2nd sub menu...

推荐答案




这篇关于主页手风琴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 08:33
查看更多