Before doing a simple small effect, using jquery mode, let tab tab switch, the effect is as follows
The code is actually very simple, first of all to share the code to everyone, the code is as follows
var shoptoggle = $ ('. Shoptoggle. Shop-toggle Li ');
var shopwrap = $ (' div.shop-wrap ');
$ (' div.shop-wrap:first-child+div.shop-wrap '). Hide ();
$ (' #Sshop-wrap '). Hide ();
var link=$ (' Div.details-link ')
var goog=$ (' div.goods-img ')
Shoptoggle.click (function () {
var $this = $ (this);
var $t = $this. Index ();
Shoptoggle.removeclass ();
$this. addclass (' shop-cur ');
Shopwrap.css (' Display ', ' none ');
Link.css (' Display ', ' none ');
Goog.css (' Display ', ' none ');
Shopwrap.eq ($t). CSS (' Display ', ' block ');
Link.eq ($t). CSS (' Display ', ' block ');
Goog.eq ($t). CSS (' Display ', ' block ');
}
Roughly explain the code
The first few lines are mainly selector selection,
Hide the corresponding selector first from line 3rd
jquery Toggle Tab Tab Example