jQuery slideToggle one div at a time instead of all independently
问题 I'm using the function below that toggles divs, and with it, any one of the entry-content divs can be opened or closed independently of all. What would be great is if only one entry-content div would be open at any time. Clicking a closed entry-title div would close any other entry-content div and then open the one clicked. I need to stay with the html markup, as it is created dynamically by Wordpress. Is this possible? Function: jQuery(document).ready(function($) { $(".entry-content").hide(