我有一個流沙組合頁面,它可以很好地工作。 爲了增加一些樂趣,我增加了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
提前感謝!