0

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.

royhowie
  • 11,075
  • 14
  • 50
  • 67
  • [If you want to make tabs using only CSS](http://stackoverflow.com/questions/25943488/how-can-i-make-tabs-with-only-css/25943489#25943489) – royhowie Mar 24 '15 at 00:44
  • is this working without the `php` code ? also i find the `php` syntax not properly maintained, like `;` for instance is being missing in many occasions. – itssajan Mar 24 '15 at 03:59

0 Answers0