Jquery show hide multiple div's

I had trouble finding the right code to show and hide multiple divs. So i came up with a solution. Pretty simple:

Add jquery:


Add this script yo head:
$(document).ready(function() {
	$('.hidediv').hide();
    $(".showdiv").click(function () {
      $(this).next('div').slideToggle('fast');
    });
});
And this is the html:
		Breadcrumbs
		
		Breadcrumbs
		
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Works on all new browsers, tested.

Коментари

Популярни публикации