simple jquery fade in bg question -
im trying have background fade in onclick jquery , im unsure on how it. here code:
$(".work").click( function(){ $("body").removeclass('bg2 , bg3').addclass("bg1"); }); $(".about").click( function(){ $("body").removeclass("bg1 , bg3").addclass("bg2"); }); $(".contact").click( function(){ $("body").removeclass("bg1 , bg2").addclass("bg3"); });
thanks :d
if using jquery ui plug-in, allow animation of color. can this:
$("body").animate({"background-color": "red"}, 1000);
and can animate color want. give "fade" effect, have animate out white , color. if not using jquery ui, may add overhead site, might want check out jquery.color plugin. 4kb in size.
here example of fading using jquery ui: http://jsfiddle.net/9vhpm/
update
i didn't realize looking fade background image. may find helpful: image loading | jquery designers
Comments
Post a Comment