Dynamic Drive: ajaxtabscontent inaction (index page)


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <div id="events-index">
  2. <h4>Latest events</h4>
  3.  
  4. <ul id="events-list">
  5. <?php query_posts( 'cat=3&posts_per_page=3' ); ?>
  6. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  7.  
  8. <li>
  9. <a href="<?php the_permalink() ?>" rel="countrycontainer">
  10. <?php the_post_thumbnail('home-widget'); ?>
  11. </a>
  12. </li>
  13.  
  14.  
  15. <?php endwhile; ?>
  16. <?php wp_reset_query(); // Reset Query ?>
  17. <?php endif; ?>
  18. <div class="clear"></div>
  19. </ul>
  20.  
  21. <div id="event-details"></div>
  22.  
  23. <script type="text/javascript">
  24.  
  25. var countries=new ddajaxtabs("events-list", "event-details")
  26. countries.setpersist(true)
  27. countries.setselectedClassTarget("link") //"link" or "linkparent"
  28. countries.init()
  29.  
  30. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.