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
Try like below... it will work...
Fiddle : http://jsfiddle.net/RYh7U/83/
$(document).ready(function () { $('.office-title').next('div').slideToggle(); $('.office-title').click(function(){ $('.office-title').next('div').slideUp(); $(this).next('div').slideToggle(); return false; }); });