Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
118
rated 0 times [  124] [ 6]  / answers: 1 / hits: 21662  / 13 Years ago, thu, january 26, 2012, 12:00:00

This is my code:


$('.items').html(response).hide().fadeIn();

The problem is that when this loads, the page "jumps" up due to the element being rendered on page first (having a height) before the .hide().fadeIn() is triggered.. is there some other way to do this?


More From » jquery

 Answers
3

You could using the opacity instead if you want to keep the dimensions of the element intact:



$('.items').html(response).css({'opacity':0}).animate({'opacity':1});

[#87793] Wednesday, January 25, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lucillemariselal

Total Points: 108
Total Questions: 97
Total Answers: 119

Location: Thailand
Member since Thu, May 6, 2021
3 Years ago
;