2012-02-26 3 views
1

スライダー(Jcarousel)内でJquery Cycleプラグインを正しく実行できません。Jquery Cycle PluginとJcarouselが正しくミックスされています

私の問題は次のとおりです。イメージがスライドされたら(これは円形スライダーです)、Cycleエフェクトはもう機能しません。

これを解決する方法はありますか?ここで

<script type="text/javascript"> 
function mycarousel_initCallback(carousel) { 
jQuery('#mycarousel-next').bind('click', function() { 
    carousel.next(); 
    return false; 
}); 
}; 
jQuery(document).ready(function() { 
if($('#mycarousel ul li').size()>4){ 
jQuery("#mycarousel").jcarousel({ 
    wrap: 'circular', 
    scroll: 2, 
    initCallback: mycarousel_initCallback, 
    buttonNextHTML: null, 
    buttonPrevHTML: null 
}); 
} 
}); 
</script> 

jQueryのサイクルのプラグインのコードである:ここで

<script type="text/javascript"> 
$(document).ready(function(){ 
    $('.cycle').cycle({        
     timeout: 500, 
     speed: 1, 
     delay: 1 
    }).cycle("pause").hover(function() { 
     $(this).cycle('resume'); 
    },function(){ 
     $(this).cycle('pause'); 
    }); 
}); 
</script> 

がある

はここ

はスライダーのコードで、事前にありがとうございましたHTML:

<div id="mycarousel" class="jcarousel-skin-tango"> 
      <ul> 
       <?php while (have_posts()) : the_post(); ?> 
       <li> 
        <div class="grid_3"> 

         <div class="cycle"> 
          <?php 
          $args = array(
           'post_type' => 'attachment', 
           'orderby' => 'menu_order', 
           'order' => ASC, 
           'post_status' => null, 
           'post_parent' => $post->ID, 
          ); 
          $attachments = get_posts($args); 
          if ($attachments): 
           foreach ($attachments as $attachment): 
            echo wp_get_attachment_image($attachment->ID, 'medium'); 
           endforeach; 
          endif; 
         ?> 
        </div><!-- .cycle --> 


       </div><!-- .grid_3 --> 
      </li> 
      <?php endwhile; ?> 
     </ul> 
     <div class="jcarousel-scroll"> 
      <a href="#" id="mycarousel-next"><img src="<?php bloginfo('template_directory'); ?>/images/slider.png" alt="" /></a> 
     </div><!-- .jcarousel-scroll --> 
    </div><!-- #mycarousel --> 
+0

を?前もって感謝します。 –

答えて

関連する問題