jQuery插件zepto.js简单实现tab切换
内容摘要
老规矩,先贴代码
<script>
$(function(){
window.onload = function()
{
var $li = $('.taocan-title li');
var $ul = $('.taocan-content .con110
<script>
$(function(){
window.onload = function()
{
var $li = $('.taocan-title li');
var $ul = $('.taocan-content .con110
文章正文
老规矩,先贴代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <script> $( function (){ window.onload = function () { var $li = $( '.taocan-title li' ); var $ul = $( '.taocan-content .con110' ); $li .mouseover( function (){ var $this = $(this); var $t = $this .index(); $li .removeClass(); $this .addClass( 'active' ); $ul .css( 'display' , 'none' ); $ul .eq( $t ).css( 'display' , 'block' ); }) } }); </script> |
以上所述就是本文的全部内容了,希望大家能够喜欢。
代码注释