jQuery show/hide next div
问题 How do I show/hide next div? The following code works: jQuery(".edittopic").click(function() { jQuery(this).next(".t_edit_cont").toggle(); }); ... only if the t_edit_cont div is right after the edittopic button. Currently, I have them in separate DIVs, like this: <div class="t_mod_box"> <input type="submit" value="Edit" class="edittopic" name="send" /> </div> <div class="t_edit_cont"> Show hide content inside here... </div> How can I make this work? jsfiddle demo. 回答1: You can use parent() to