I’m using these scripts to fade in content, margin-right 0 the fourth item and to do the gray-color hovers:
$(document).ready(function(){
$("div.item:nth-child(4n+4)").css("margin-right", "0px");
});
$(document).ready(function(){
$("#main").hide().fadeIn();
});
$(document).ready(function(){
$("img.a").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
});
The problem, is that when I load “portfolio” or “acerca” page (specially the text on the “acerca” section), the main content does a jump before the fade in. What i’m doing wrong?
Esteban I think you should get ‘#main’ div hidden by default so browser didn’t render it, and later in the ready callback do the fadein. To clarify, your following html:
could be changed to
and then change this jquery:
to this
try it, I think it’ll work fine..
Btw, I’m spanish website coder currently in madrid, and I’m going to start freelancing soon, if you need some website backend code for some project you can contact me 🙂