$(function(){

  $('.accordion-target').hide();
  $('.accordion-trigger').on('click',function(){
    $(this).toggleClass('active');
    $(this).next().toggleClass('active').slideToggle();
  });

  let wWidth = $(window).width();
  let wHeight = window.innerHeight;
  const wSm = 1024;
  // 画面幅が1024以上だったら
  if (wWidth >= wSm) {
      $('.accordion-target--pc').hide();
      $('.accordionTrigger--pc').on('click',function(){
        $(this).toggleClass('active');
        $(this).next().toggleClass('active').slideToggle();
      });
    }else{
      $('.accordion-target--sp').hide();
      $('.accordion-trigger--sp').on('click',function(){
        $(this).toggleClass('active');
        $(this).next().toggleClass('active').slideToggle();
      });
    }
  });