【发布时间】:2012-08-06 19:42:03
【问题描述】:
我有一个带有流沙的投资组合页面,它运行良好。 为了增加一些乐趣,我添加了 prettyPhoto,效果也很好。
但现在我为图像添加了悬停效果。它正在工作,但是当我使用过滤器进行排序时,悬停效果已经消失。我什至没有看到它在 Firebug 中工作。
加载 .js 文件 -> jquery、流沙、prettyphoto 和悬停功能。 php 文件(wordpress)如下所示:
<script type='text/javascript'>
$(document).ready(function(){
$("img").hover(
function() {
$(this).stop().animate({"opacity": "0.8"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
}
);
});
</script>
php 文件的其余部分:
<!-- #content BEGIN -->
<div id="contentport" class="clearfix">
<ul class="filter clearfix">
<li><strong>Filter:</strong></li>
<li class="active"><a href="javascript:void(0)" class="all">All</a></li>
xxxx php magic xxxx
<ul class="filterable-grid clearfix">
xxxx php magic xxxx
<li data-id="id-<?php echo $count; ?>" data-type="<?php foreach ($terms as $term) { echo strtolower(preg_replace('/\s+/', '-', $term->name)). ' '; } ?>">
<?php
// Check if wordpress supports featured images, and if so output the thumbnail
if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) :
?>
<?php // Output the featured image ?>
<a rel="prettyPhoto[gallery]" href="<?php echo $large_image ?>"><?php the_post_thumbnail('portfolio'); ?></a>
<?php endif; ?>
<?php // Output the title of each portfolio item ?>
<p><a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a></p>
</li>
xxxx php magic xxxx
</ul>
xxxx php magic xxxx
</div>
我希望你有你需要的一切,我已经看过那些链接,但我真的不知道该怎么办...... hover effect with quicksand plugin
How to apply jQuery quicksand (sort) without losing a jQuery based portfolio hover?
jQuery quicksand plugin with .click method
提前致谢!
【问题讨论】:
标签: animation hover prettyphoto quicksand