WEB広告運用の困りごとが集まる場所 コミュニティ コミュニティ アコーディオンボタンウィジェットを組み合わせたい 返信先:アコーディオンボタンウィジェットを組み合わせたい

  • ひじり

    メンバー
    2023年10月13日 12:17

    ▼HTML

    <script>

    var scAccordionBtn = scAccordionBtn || {};

    (function(_) {

    const target = ‘.js-accordion’;

    _.method = function(el) {

    const btn = el.querySelector(‘.accordion-btn’);

    const contents = el.querySelector(‘.accordion-contents’);

    contents.classList.add(‘is-hide’);

    btn.addEventListener(‘click’, function() {

    contents.classList.toggle(‘is-hide’);

    this.classList.toggle(‘is-open’);

    });

    }

    _.init = function() {

    Array.from(document.querySelectorAll(target), el => {

    _.method(el);

    });

    };

    })(scAccordionBtn);

    </script>

    <script>

    document.addEventListener(‘DOMContentLoaded’, scAccordionBtn.init, false);

    </script>

    <div class=”accordion-wrap js-accordion”>

    <div class=”accordion-btn mark”>

    ボタンのテキストが入ります

    </div>

    <div class=”accordion-contents”>

    <div class=”wrap-table-compare”>

    <table class=”table-compare”>

    <thead>

    <tr>

    <th><span style=”font-size: 17px;” class=”sb-fs-free”>機能一覧</span></th>

    <th><span style=”font-size: 17px;” class=”sb-fs-free”>機能詳細</span></th>

    <th><span style=”font-size: 17px;” class=”sb-fs-free”>利便性</span></th>

    <th><span style=”font-size: 17px;” class=”sb-fs-free”>カテゴリ</span></th>

    </tr>

    </thead>

    <tbody>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112731/b470a448-1d07-452d-acec-196f15f74017.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112731/b470a448-1d07-452d-acec-196f15f74017.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112731/b470a448-1d07-452d-acec-196f15f74017.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>全国の雨雲レーダーを5分間隔、60時間先まで確認出来る</span></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”></span><span class=”symbol circle double red sb-fs-free”></span></td>

    <td>

    <span class=”tag pink”>雨雲レーダー</span><span class=”tag blue”>全国の天気</span><span class=”tag green”>現在地の天気</span><span class=”tag yellow”>外出の目安</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112737/d08f7543-dec1-45cf-a64e-92e573ef1eba.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112737/d08f7543-dec1-45cf-a64e-92e573ef1eba.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112737/d08f7543-dec1-45cf-a64e-92e573ef1eba.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>台風の発生、進路、強さなど台風の詳細情報を確認出来る</span></td>

    <td><span class=”symbol circle double red”></span></td>

    <td>

    <span class=”tag pink”>台風詳細</span><span class=”tag blue”>台風の進路</span><span class=”tag green”>台風の強さ</span><span class=”tag yellow”>台風の影響</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112739/81dcf604-f3b2-415e-a2c9-068681869ebd.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112739/81dcf604-f3b2-415e-a2c9-068681869ebd.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112739/81dcf604-f3b2-415e-a2c9-068681869ebd.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>全国の週間天気が確認出来る</span></td>

    <td><span class=”symbol circle double red”></span></td>

    <td>

    <span class=”tag pink”>週間天気</span><span class=”tag blue”>全国の天気</span><span class=”tag green”>天気予報</span><span class=”tag yellow”>外出の目安</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112740/7038c014-4081-4f78-a5f2-3fe7f3af5f0b.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112740/7038c014-4081-4f78-a5f2-3fe7f3af5f0b.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112740/7038c014-4081-4f78-a5f2-3fe7f3af5f0b.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>天気に関する様々なニュースをお届け</span></td>

    <td><span class=”symbol circle red”></span></td>

    <td>

    <span class=”tag pink”>全国の出来事</span><span class=”tag blue”>服装チェック</span><span class=”tag green”>旬のニュース</span><span class=”tag yellow”>キャスター</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112761/af6d0118-293f-40e9-a5d4-46f628ff3118.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112761/af6d0118-293f-40e9-a5d4-46f628ff3118.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112761/af6d0118-293f-40e9-a5d4-46f628ff3118.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>全国の熱中症情報が確認出来る</span></td>

    <td><span class=”symbol circle double red”></span></td>

    <td>

    <span class=”tag pink”>熱中症情報</span><span class=”tag blue”>熱中症リスク</span><span class=”tag green”>全国の気温</span><span class=”tag yellow”>熱中症対策</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112764/e366102b-d1e0-4c91-b663-205ad13e11c6.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112764/e366102b-d1e0-4c91-b663-205ad13e11c6.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112764/e366102b-d1e0-4c91-b663-205ad13e11c6.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>全国のゲリラ豪雨・雷情報が3時間先まで確認出来る</span></td>

    <td><span class=”symbol circle double red”></span></td>

    <td>

    <span class=”tag pink”>ゲリラ豪雨</span><span class=”tag blue”>全国の天気</span><span class=”tag green”>雨対策</span><span class=”tag yellow”>雷対策</span>

    </td>

    </tr>

    <tr>

    <td><a href=”#”>

    <figure class=”icon”>

    <picture>

    <source type=”image/webp” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112766/04822f5d-9e77-4370-86ee-c14fb4a6a069.webp”>

    <source type=”image/avif” srcset=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112766/04822f5d-9e77-4370-86ee-c14fb4a6a069.avif”><img src=”https://file.mysquadbeyond.com/uploads/article_photo/photo/3112766/04822f5d-9e77-4370-86ee-c14fb4a6a069.PNG” width=”97″ height=”65″ draggable=”false” class=”lazyload”>

    </picture>

    </figure>

    </a></td>

    <td><span style=”font-size: 11px;” class=”sb-fs-free”>全国各地の方が地域ごとの天気情報を<br>投稿してくれる</span></td>

    <td><span class=”symbol circle red”></span></td>

    <td>

    <span class=”tag pink”>投稿リポート</span><span class=”tag blue”>全国の天気</span><span class=”tag green”>空模様・気温</span><span class=”tag yellow”>風の強さ</span>

    </td>

    </tr>

    </tbody>

    </table>

    </div>

    </div>

    </div>