Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery running to soon. working only in chrome

I have set blog text in my page to opacity 0, so that it fades in to opacity 1 on page load with this code.

$(document).ready(function(){
    $('.entry').animate({opacity:1},700);
});

the text only fades in on chrome, in firefox the text is already set to opactiy 1 with no visible fade in effect. I have tried to put the code in the footer, but the text is still visible when the page loads. I know for I.E I have to do it with a filter.

like image 216
Alex Borsody Avatar asked Jan 27 '26 12:01

Alex Borsody


1 Answers

If fading is your only requirement use the jQuery fadeOut() and fadeIn() functions as they are more cross-browser safe than animating the opacity property.

like image 130
Karl-Bjørnar Øie Avatar answered Jan 30 '26 06:01

Karl-Bjørnar Øie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!