Today I suddenly had a whim and thought of a very simple way to achieve the tab effect
In fact, the logic is very simple, but it is basically not written like this on the Internet
I don’t know if there will be any problems in actual application, please give me some advice
jQuery Simple Tab
>
<script><br>
$(function(){<br>
window.onload = function()<br>
{<br>
var $li = $('#tab li');<br>
var $ul = $('#content ul');<a href="http://libs.baidu.com/jquery/1.9.0/jquery.js%22></script">
$li.click(function(){</a>
$li.removeClass();<br />
var $t = $(this).index();<br />
$(this).addClass('current');<br />
$ul.css('display','none');<br />
$ul.eq($t).css('display','block');<br />
})<br />
}<br />
});<br />
</script>%20
%0A
%0A
%0A
%0A
Picture%20demonstration:%20
%0A
The above is all the content described in this article, I hope you all like it.