<?php

/* @var $this yii\web\View */
/* @var $model common\models\Goods */
/* @var $goodsSkuProvider ActiveDataProvider */

/* @var $goodsAttrProvider ActiveDataProvider */

use yii\data\ActiveDataProvider;

?>


<div class="nav-tabs-custom">
    <ul class="nav nav-tabs" id="navTabs">
        <li class=""><a href="#tab_1" aria-expanded="true">商品信息</a></li>
        <li><a href="#tab_2" aria-expanded="true">商品规格</a></li>
        <li><a href="#tab_3" aria-expanded="true">商品属性</a></li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane" id="tab_1">
            <?= $content ?>
        </div>

        <div class="tab-pane" id="tab_3">

        </div>
    </div>
</div>

<?php
$js = <<<JS
    //layer相册
    layer.ready(function () {
        layer.photos({
            photos: '.upload-kit-item, .media-content',
            shift: 5
        });
    });
    //tab标签页切换
    $('#navTabs a').click(function (e) {
      e.preventDefault();
      $(this).tab('show');
      location.hash = $(this).attr('href');
    });
    //默认激活标签页
    $('#navTabs a:first').tab('show');
    if (location.hash) {
        $('#navTabs a[href="' + location.hash + '"]').tab('show');
    }
JS;
$this->registerJs($js);
?>

