Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="right" class="medium-4 columns show-for-medium-up" >
- <dl class="tabs" data-tab>
- <dd class="active"><a href="#recent">Recent</a></dd>
- <dd><a href="#popular">Popular</a></dd>
- </dl>
- <div class="tabs-content">
- <div class="content active" id="recent">
- <ul>
- <?php
- $query= new WP_Query();
- $query->query(array('posts_per_page'=>10));
- while ($query->have_posts()) : $query->the_post();
- ?>
- <li><a href="<?php the_permalink();?>"><?php the_title();?></a></li>
- <?php endwhile; wp_reset_query();?>
- </ul>
- </div><!-- END .content -->
- <div class="content" id="popular">
- Popular posts
- </div>
- </div><!-- END .tabs-content -->
- </div><!-- END #right -->
- <script>
- $(document).scroll(function() {
- var y = $(document).scrollTop(), right = $("#right");
- if(y >= 160) {
- right.css({position: "fixed"});
- } else {
- right.css({position: "relative"});
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement