0
如何使用WordPress循環內的jquery不重複效果如何在WordPress Loop中使用jQuery?
<div class="post">
<?php if (have_posts()) :
while (have_posts()) : the_post(); ?>
<a class="post_image" href="<?php the_permalink(); ?>" >
<img class="post_image_home" src='<?php $thumb = get_post_custom_values('post_thumb'); echo $thumb[0]?>' alt="postimg" />
</a><!--post_image-->
<?php endwhile; endif; ?></div><!--post-->
的jQuery:
$j=jQuery.noConflict();
$j('document').ready(function() {
$j('.post').hover(function() {
$j('.post_image').stop().animate({"margin-bottom":"10px",},"fast");
},function(){
$j('.post_image').stop().animate({"margin-bottom":"0px",},"fast");
}); });
我需要一個例子我初學者XD請 – RoVeR 2013-05-09 16:16:53