javascript - jQuery show next set of elements -
i trying toggle visibility of following links after click on h2 keep coming against brick wall.
here html , jquery
<div class="entry-content cibi"> <h2><strong>corporate infrastructure service plan</strong></h2> <p><a href="http://intranet/cibi/files/2014/03/service-plan-including-service-specific-risks-and-all-action-plans-.docx">service plan (including service specific risks , action plans)</a></p> <p><a href="http://intranet/cibi/files/2014/03/scorecard.pdf">scorecard</a></p> <p><a href="http://intranet/cibi/files/2014/03/corporate-infrastructure-service-plan.xls">corporate infrastructure service plan</a></p> <h2><strong>employee statistics</strong></h2> <p><a href="http://intranet/cibi/files/2014/03/absence-management-statistics-.xls">absence management statistics</a></p> </div> $(document).ready(function(){ $( "h2" ).click(function() { $(this).nextuntil("h2").toggle() return false; }); }); can help?
$(document).ready(function(){ $( "h2" ).click(function() { $(this).nextuntill('h2').toggle() return false; }); });
Comments
Post a Comment