...
|
...
|
@@ -11,10 +11,18 @@ lazyLoad($('img.lazy')); |
|
|
|
|
|
plusstar = {
|
|
|
init: function() {
|
|
|
var that = this, $liDom;
|
|
|
var that = this,
|
|
|
$liDom,
|
|
|
$tabUlDom;
|
|
|
|
|
|
$tabUlDom = $('.plusstar-page .tab-nav ul');
|
|
|
|
|
|
$tabUlDom.find('li').css({
|
|
|
width: 100 / $tabUlDom.find('li').length + '%'
|
|
|
});
|
|
|
|
|
|
// 事情委托机制
|
|
|
$('.plusstar-page .tab-nav ul').bind('click', function(event) {
|
|
|
$tabUlDom.bind('click', function(event) {
|
|
|
$liDom = $(event.target).closest('li');
|
|
|
|
|
|
if ($liDom.hasClass('focus')) {
|
...
|
...
|
@@ -38,7 +46,7 @@ plusstar = { |
|
|
$liDom = $('.plusstar-page .tab-nav ul li:eq(0)');
|
|
|
break;
|
|
|
}
|
|
|
$('.plusstar-page .tab-nav ul').find('li').removeClass('focus');
|
|
|
$tabUlDom.find('li').removeClass('focus');
|
|
|
$liDom.addClass('focus');
|
|
|
that.tabNav($liDom.data('code'));
|
|
|
|
...
|
...
|
|