Shopify FAQ page template with automatic questions and answers using jQuery

<div class="page-title clearfix">
  <div class="page-title-inner">
    <div class="page-title-title">
      <h1 class="sweetsansmedium"><span>{{ page.title }}</span></h1>
    </div>
  </div>            
</div>
<div class="page-wrapper clearfix faq">
  <div class="page-container">
    <div class="rte page-container-content">
      {{ page.content }}
    </div>
  </div>
  <div class="page-follow">
    {% include 'help-menu' %}
  </div>
</div>

<script>
 jQuery(function($) {
   
   $('.page-container-content').children(':not(h1):not(h2)').hide();
   $('.page-container-content h2').click(function() {
        $(this).toggleClass('open');
        $(this).nextUntil('h2').toggle();
     	
    });

   }); 
</script>