How to create a table with switching tab content?

前端 未结 2 1695
花落未央
花落未央 2021-01-13 02:08

I want to make a table looks like this: \"enter

The inside table is not an issue but d

相关标签:
2条回答
  • 2021-01-13 02:45

    People usually call those tabs. You can find an example in this link.

    0 讨论(0)
  • 2021-01-13 03:03

    You could certainly use jQuery to solve this. That's what I did when I needed some tabs. I did something like:

    <ul>
       <li><a href="#tab-description">Description</a></li>
       <li><a href="#tab-shipping">Shipping</a></li>
       <li><a href="#tab-returns">Returns</a></li>
    </ul>
    <div id="tab-description" class="mytabs">
    </div>
    <div id="tab-shipping" class="mytabs">
    </div>
    <div id="tab-returns" class="mytabs">
    </div>
    

    and then some jQuery to make the tabs:

    <script language="javascript" type="text/javascript">
       $(document).ready(function () {
          $("#mytabs").tabs({ fx: {opacity: 'toggle'} });
       });
    </script>
    

    works pretty nicely for me. Just fill in whatever your content is in each of the divs.

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