I have a page that when a user clicks a title, the following div toggles display.
I want to somehow say if any other divs are display:block then set them to display non
is not a valid closing. The closing should be
Title
sadasd
Title
sadasd
Title
sadasd
CSS:
.office
{
display: none;
}
and jquery:
$(function () {
$('.office-title').click(function () {
$(this).next('div').slideToggle();
$(this).parent().siblings().children().next().slideUp();
return false;
});
});
HERE YOU CAN CHECK