Advertisement
bojanCG

Markup for tabs

Aug 9th, 2015
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.77 KB | None | 0 0
  1. <div id="tabs"> <!-- 1st set of tabs -->
  2.   <ul>
  3.     <?php
  4.        for ($i=1; $i < 4; $i++) {
  5.    ?>
  6.             <li><a href="#tabs-<?php echo $i; ?>">Tab <?php echo $i; ?></a></li>
  7.     <?php
  8.        }
  9.    ?>
  10.   </ul>
  11.  
  12. <?php
  13. for ($i=1; $i < 4; $i++) {
  14. ?>
  15.     <div id="tabs-<?php echo $i; ?>">
  16.     <!-- content in these tabs is similar, but with different data, that is why I used loop -->
  17.     </div>
  18. <?php
  19. }
  20. ?>
  21.  
  22. <div id="secondary-tabs"> <!-- 2nd set of tabs -->
  23.     <ul>
  24.         <li><a href="#secondary-tabs-1">Secondary Tab 1</a></li>
  25.         <li><a href="#secondary-tabs-2">Secondary Tab 2</a></li>
  26.     </ul>
  27.  
  28.     <div id="secondary-tabs-1">
  29.     <!-- 1st tab content -->
  30.     </div>
  31.     <div id="secondary-tabs-2">
  32.     <!-- 2nd tab content -->
  33.     </div>
  34. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement