Indexhibit accordion menu v2


/ Published in: PHP
Save to your folder(s)

Toggle section titles


Copy this code and paste it in your HTML
  1. /*======== General section title toggle script ==*/
  2.  
  3. function sectiontoggle(){
  4. $('.section-title').nextAll().hide();
  5. if($('nav').find('.active').length){
  6. $('nav li.active').parents('ul').children('li').show();
  7. }
  8. $('.section-title').click(
  9. function(){
  10. if($(this).nextAll().is(':hidden')){
  11. $(".section-title").not(this).nextAll().slideUp();
  12. $(this).nextAll().slideDown();
  13. } else {
  14. $(this).nextAll().slideUp();
  15. }
  16. });
  17. };
  18.  
  19. sectiontoggle();

URL: http://gatonet.de

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.