css properties at jquery selector do not work when Infinite Scroll load new elements
This is my code:
- $('.home_post_box').hover(
- function() {
- $( this).find('.home_post_text').css({
- 'visibility':'visible',
- 'opacity':'0.9',
- 'transition':'visibility 0.5s ease,opacity 0.5s ease',
- '-o-transition': 'visibility 0.5s ease 0.5s,opacity 0.5s ease'
- });
- },
- function () {
- $(this).find('.home_post_text').css({
- 'visibility' : 'hidden',
- 'opacity' : '0',
- 'transition': 'visibility 0.5s ease 0.5s,opacity 0.5s ease',
- '-o-transition': 'visibility 0.5s ease 0.5s,opacity 0.5s ease'
- });
- }
- );
my code working so good at start but when "Infinite Scroll" load new elements, this code do not work for new elements and for old elements working but without transition.
what is the problem?