Return to Snippet

Revision: 48879
at July 12, 2011 21:56 by G470


Updated Code
<script type='text/javascript'>

$(function() {
/*	Accordion Menu for Indexhibit uses jquery
 *
 *	Created by G470  Jul 2011
*/

/*** first hide all sub Elements ***/
$aswt = $("#menu .container ul li.section-title");
$aswt.nextAll().hide();
/*** cursor for the section title ***/
$aswt.css({'cursor':'pointer'});
/*** remove the next line if you don't want to show active menu by default ***/
$('#menu .container ul li.active').parent().children().show();
/*** click function for  section title ***/
$aswt.click(function(){
if($(this).next().is(':visible')){$aswt.nextAll().hide(500);
}else{
$aswt.nextAll().hide(500);
$(this).nextAll().slideToggle(500);
	    };
});
});

</script>

Revision: 48878
at July 12, 2011 21:56 by G470


Updated Code
<script type='text/javascript'>

$(function() {
/*	Accordion Menu for Indexhibit uses jquery
 *
 *	Created by G470  Jul 2011
*/

/*** first hide all sub Elements ***/
$aswt = $("#menu .container ul li.section-title");
$aswt.nextAll().hide();
/*** cursor for the section title ***/
$aswt.css({'cursor':'pointer'});
/*** remove the next line if you don't want to show active menu by default ***/
$('#menu .container ul li.active').parent().children().show();
/*** click function for  section title ***/
$aswt.click(function(){
if($(this).next().is(':visible')){$aswt.nextAll().hide(500);
}else{
$aswt.nextAll().hide(500);
$(this).nextAll().slideToggle();
	    };
});
});

</script>

Revision: 48877
at July 12, 2011 09:15 by G470


Initial Code
<script type='text/javascript'>

$(function() {
//#### first hide all sub Elements ####//
$aswt = $("#menu .container ul li.section-title");
$aswt.nextAll().hide();
//#### cursor for the section title ####//
$aswt.css({'cursor':'pointer'});
//#### remove the next line if you don't want to show active menu by default ####//
$('#menu .container ul li.active').parent().children().show();
//#### click function for  section title ####//
$aswt.click(function(){
if($(this).next().is(':visible')){$aswt.nextAll().hide(500);
}else{
$aswt.nextAll().hide(500);
$(this).nextAll().slideToggle();
	    };
});
});

</script>

Initial URL


Initial Description
to make use of this snippet you have to update the jquery.js file in your ndxz-studio/site/js folder to a new version.

Initial Title
Indexhibit accordion menu

Initial Tags
jquery

Initial Language
jQuery