Archived topic
Add masonry box hover effect
3 replies · Started by Anonymous on January 25, 2015
Hey there, just a suggestion, would it be possible to add a hover effect on the whole masonry box, a slow enlargement effect whenever you hover over a certain post.
Cheers!
EMATE.co
Hi there,
You could potentially do something using some custom javascript.
Something like this added to the wp_footer section of GP Hooks may work (untested):
<script>
jQuery(document).ready(function($) {
$( ".masonry-post" ).hover(
function() {
$( this ).css( 'transform', 'scale(1.1)' );
}, function() {
$( this ).css( 'transform', 'scale(101)' );
}
);
});
</script>
Here's the trick GP guys have found out to solve it :)
https://docs.generatepress.com/article/add-a-zoom-effect-on-hover-to-post-images/