PHP 29
JQuery UI Tabs By micha on 13th April 2021 09:10:14 AM
  1. $('.tab-wrap').tabs({
  2.     hide: {
  3.       effect: 'slideUp',
  4.       duration: 250
  5.     },
  6.     show: {
  7.       effect: 'slideDown',
  8.       duration: 250
  9.     }
  10.   });
  11.  
  12.  
  13. <?php
  14. $tabs = get_field('tabs-repeater');
  15. $i = 1;
  16. $n = 1;
  17. ?>
  18.  
  19. <div class="tab-wrap <?php echo $wrapClass; ?>">
  20.   <ul class="tab-navigation">
  21.         <?php foreach($tabs as $tab) { ?>
  22.           <li><a href="#tab-<?php echo $i; ?>"><?php echo $tab['tab_title']; ?></a></li>
  23.         <?php $i++; } ?>
  24.   </ul>
  25.   <?php foreach($tabs as $tab) { ?>
  26.         <div id="tab-<?php echo $n; ?>" class="tab-content"><?php echo $tab['tab_text']; ?></div>
  27.   <?php $n++; } ?>
  28. </div>

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.