答案 0 :(得分:0)
我为你做了一个非常简单的例子
$("#tab1").click(function() {
$("#section2").hide();
$("#section1").show();
});
$("#tab2").click(function() {
$("#section1").hide();
$("#section2").show();
});

ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
cursor: pointer;
}
#section2 {
display: none;
}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<nav>
<ul>
<li id="tab1">Tab 1</li>
<li id="tab2">Tab 2</li>
</ul>
</nav>
<section id="section1">
Content 1
</section>
<section id="section2">
Content 2
</section>
</div>
&#13;