jQuery submenu like an accordion

前端 未结 1 1537
野性不改
野性不改 2021-01-26 07:52

on the webpage oshadi-yoga.ch i like to get an navigation menu with a list like this:

  • Yoga
1条回答
  •  太阳男子
    2021-01-26 08:22

    I should rewrite the code al little

    
    

    Added a span.

    jQuery:

    $('.section-title > span').on('click', function()
    {
        $(this).siblings('ul').slidetoggle();
    });
    

    I hope this helps a little (or misunderstood I the question a bit?)

    0 讨论(0)
提交回复
热议问题