Response title
This is preview!
$(document).ready(function() {
$('div.accordion> div').hide();
$('.offen').show();
//1st idea
// $('.aktiv').each(function() {
// if(this.href == window.location) $(this).addClass('active');
// });
// 2nd idea
// $('aktiv a:path').parent().addClass('active');
$('div.accordion> h3').click(function() {
var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');
if ($visibleSiblings.length ) {
$visibleSiblings.slideUp('normal', function() {
$nextDiv.slideToggle('slow')
});
} else {
$nextDiv.slideToggle('slow');
}
});
});
© 2013 jQuery Foundation
Sponsored by and others.