/** * jquery.fade-in.js * 제작 : 베원 (com1.kr) * * 본 코드 사용시 이 주석을 유지해주시기 바랍니다. * 이외에는 제약 없이 사용 가능합니다. */ function triggerJqueryFadeIn(){$(".fade-in").each(function(){var e=$(this).offset().top;$(window).scrollTop()+$(window).height()>e&&"0"==$(this).css("opacity")&&animateQueue.push(this)}),triggerJqueryFadeInQueue()}function triggerJqueryFadeInQueue(){if(0!=animateQueue.length&&ready){ready=!1,$this=animateQueue.shift();var e=void 0!=$($this).attr("data-fade-in-speed")?parseInt($($this).attr("data-fade-in-speed")):200;$($this).animate({opacity:"1",top:"0px"},e,function(){$($this).css("position","static"),ready=!0,triggerJqueryFadeInQueue()})}}$(document).ready(function(){$(".fade-in").css({opacity:"0",position:"relative",top:"50px"}),triggerJqueryFadeIn(),$(window).scroll(triggerJqueryFadeIn)});var animateQueue=new Array,ready=!0;