Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <div id="right" class="medium-4 columns show-for-medium-up" >
  2. <dl class="tabs" data-tab>
  3. <dd class="active"><a href="#recent">Recent</a></dd>
  4. <dd><a href="#popular">Popular</a></dd>
  5. </dl>
  6. <div class="tabs-content">
  7. <div class="content active" id="recent">
  8. <ul>
  9. <?php
  10. $query= new WP_Query();
  11. $query->query(array('posts_per_page'=>10));
  12. while ($query->have_posts()) : $query->the_post();
  13. ?>
  14.  
  15. <li><a href="<?php the_permalink();?>"><?php the_title();?></a></li>
  16.  
  17. <?php endwhile; wp_reset_query();?>
  18.  
  19. </ul>
  20. </div><!-- END .content -->
  21. <div class="content" id="popular">
  22. Popular posts
  23. </div>
  24. </div><!-- END .tabs-content -->
  25. </div><!-- END #right -->
  26.  
  27.  
  28. <script>
  29. $(document).scroll(function() {
  30. var y = $(document).scrollTop(), right = $("#right");
  31. if(y >= 160) {
  32. right.css({position: "fixed"});
  33. } else {
  34. right.css({position: "relative"});
  35. }
  36. });
  37. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement