7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tableをアコーディオンにする。

Last updated at Posted at 2016-01-12

テーブルのセルをクリックすると、下の行が表示される。もう一度クリックすると非表示になる。

<table class="table table-bordered ">
    <thead>
        <tr>
            <th>題名</th>
            <th>時間</th>
        </tr>
    </thead>

    <tbody>
	<tr class="item-done clickable" data-toggle="collapse" data-target="#accordion5">
        <td>このカラムをクリックするとメニューを出し入れできる。</td>
        <td>9m25s</td>
    </tr>
    <tr>
        <!-- ここのstleは!importantを使ってcssファイルにした方が良い -->
        <td colspan="2" style="padding:0px">

            <div id="accordion5" class="collapse">
                <ol type="a" style="background-color:white;">
                    <li><a>メニュー1</a></li>
                    <li><a>メニュー2</a></li>
                    <li><a>メニュー3</a></li>
                </ol>
            </div>
        </td>
    </tr>
7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?