douli4337 2015-03-24 00:42
浏览 26

在jQuery中创建选项卡

I need someones help. I am trying this sample way on how to create tabs using jQuery and i have trouble applying it to my current php file. This is the sample code i want to apply.

<div class="tabbed">
<!-- The tabs -->
<ul class="tabs">
<li class="t1"><a class="t1 tab" title="<?php _e('Tab 1'); ?>"><?php _e('Tab 1'); ?></a></li>
<li class="t2"><a class="t2 tab" title="<?php _e('Tab 2'); ?>"><?php _e('Tab 2'); ?></a></li>
</ul>

<!-- tab 1 -->
<div class="t1">
<!-- Put what you want in here.  For the sake of this tutorial, we'll make a list.  -->
<ul>
    <li>List item</li>
</ul>
</div> <!-- ... --> </div>

to

<div class="<?php echo $this->wrap_class ?>">
           <?php $record = new PDb_Template($this); ?>
  <?php while ( $this->have_groups() ) : $this->the_group(); ?>
  <div class="section tabbed" id="<?php echo Participants_Db::$prefix.$this->group->name ?>">
  <?php $this->group->print_title( '<h2>', '</h2>' ) ?>
    <?php $this->group->print_description( '<p>', '</p>' ) ?>
      <?php while ( $this->have_fields() ) : $this->the_field();
          // skip any field found in the exclude array
          if ( in_array( $this->field->name, $exclude ) ) continue;
          // CSS class for empty fields
                    $empty_class = $this->get_empty_class( $this->field );
      ?>  
    <dl class="<?php echo Participants_Db::$prefix.$this->field->name.' '.$this->field->form_element.' '.$empty_class?>">
      <dt class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_label() ?></dt>
      <dd class="<?php echo $this->field->name.' '.$empty_class?>">
      <?php 
        if ($this->field->name == 'edit_link') {
          $this->field->link = $record->get_edit_link();
        }
      $this->field->print_value()
      ?>
      </dd>
    </dl>
        <?php endwhile; // end of the fields loop ?>
  </div>
  <?php endwhile; // end of the groups loop ?>
</div>

JS and CSS file for this is all set but still working on thi php.

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度