Hello, the problem appears when your in archive page, with pagination. When you click to another page (and ajax runs), then the images doesn’t flip.
My solution is temporary, i am sure there will be a more stable solution for this. The point in my view was to run again the javascript code when a woocommerce pagination button is click.
I uses the code bellow:
jQuery(document).ready(function($){
jQuery( ‘.woocommerce-pagination a.page-numbers’ ).live(‘click’, function(){
// console.log(“Triggered clicked”);
setTimeout(flipimage, 3500);
});
function flipimage(){
// console.log(“Runed after timeout”);
jQuery( ‘ul.products li.pif-has-gallery a:first-child’ ).hover( function() {
jQuery( this ).children( ‘.wp-post-image’ ).removeClass( ‘fadeInDown’ ).addClass( ‘animated fadeOutUp’ );
jQuery( this ).children( ‘.secondary-image’ ).removeClass( ‘fadeOutUp’ ).addClass( ‘animated fadeInDown’ );
}, function() {
jQuery( this ).children( ‘.wp-post-image’ ).removeClass( ‘fadeOutUp’ ).addClass( ‘fadeInDown’ );
jQuery( this ).children( ‘.secondary-image’ ).removeClass( ‘fadeInDown’ ).addClass( ‘fadeOutUp’ );
});
}
});
The only problem here, is that i had to set a timeout to work. If i could help with a better solution, let me know ??