Home › Forums › JavaScript › jQuery opacity help › Re: jQuery opacity help
August 27, 2009 at 8:15 pm
#62914
GreyFox135
Participant
"von" wrote:
I believe if you specify timing it might fix things. Add ", 0" after you animate selector.
Code:
$(document).ready(function(){
$(‘#nav span’).animate({ “opacity” : 0 }, 0);
$(‘#nav span’).animate({ “opacity” : 0 }, 0);
It tells the animate to occur immediately instead of whatever the default timing is. It seemed to fix my little test I built to reproduce the behavior, but I didn’t have any other scripts on the page, so it might still be something else on your page that is hosing things up.
Now instead if it fading away it just turns off like a light bulb. I wish it just never displays when the pages loads.