Advertisement
Grawl

Untitled

Dec 3rd, 2011
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. <div id="fotorama">
  2.     <?php
  3.         query_posts('category_name=ipad');
  4.         while (have_posts()) : the_post();
  5.             the_post_thumbnail('thumbnail');
  6.         endwhile;
  7.     ?>
  8.     <div id="html">
  9.         <?php
  10.             query_posts('category_name=ipad');
  11.             while (have_posts()) : the_post();
  12.                 ?>
  13.                     <div class="b-slide">
  14.                         <a href="<?php the_permalink() ?>">ссылка</a>
  15.                     </div>
  16.                 <?php
  17.             endwhile;
  18.         ?>
  19.     </div>
  20. </div>
  21. <script type="text/javascript">
  22.     var html = $('.b-slide', '#html');
  23.     $('#fotorama').fotorama({
  24.         width: 374,
  25.         height: 280,
  26.         cropToFit: true,
  27.         thumbsPreview: false,
  28.         html: {
  29.             <?php
  30.                 $b_slide = -1;
  31.                 query_posts('category_name=ipad');
  32.                 while (have_posts()) : the_post();
  33.                     $b_slide = $b_slide + 1;
  34.                     echo $b_slide . ' : html.eq(' . $b_slide . '),';
  35.                 endwhile;
  36.             ?>
  37.         }
  38.     });
  39. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement