I have a portfolio page with quicksand, which is working perfectly. To add some more fun, I added prettyPhoto to it, working perfectly too.
But now I added a hover effect to the images. It is working, but when I sort with the filter, the hover effect has gone. I don't even see it working in Firebug.
Loading .js files -> jquery, quicksand, prettyphoto and then the hover function. The php file (wordpress) looks like this:
<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>
The rest of the php file:
<!-- #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>
I hope you have everything you need, I already looked at those links, but I really don't know what to do ... hover effect with quicksand plugin
How to apply jQuery quicksand (sort) without losing a jQuery based portfolio hover?
jQuery quicksand plugin with .click method
Thanks in advance !
Almost solved, for the jQuery, this code works. But the magnifying glass still doesn't work.