코드가 작동하지만 확실하지 않은 이유는 무엇입니까? 내 문제가 무엇인지 생각하면 감사하겠습니다.jquery fadein 문제
<script type="text/javascript">
$(window).load(function() {
var lastSlide = "";
$('#slider').nivoSlider({
effect: 'random',
directionNavHide : true,
slices : 15,
animSpeed : 500,
pauseTime : 6000,
controlNav : false,
pauseOnHover : true,
directionNav:true, //Next & Prev
directionNavHide:true, //Only show on hover
beforeChange: function(){
if(lastSlide == "images/header_used.jpg") { //use the bg image of the slide that comes before the newslide
$("body").attr("style","background: #000 url(images/bg.jpg) top center no-repeat;").fadeIn("slow");
} else {
$("body").attr("style","background: #ADADAD url(images/bgnd_grad.jpg) repeat-x;").fadeOut("slow");
}
},
afterChange: function() {
t = $(this).children("a:visible");
lastSlide = $("img", t).attr("src");
}
});
});
</script>
'$ ("몸 ") ATTR ("스타일 "로 배경을 보일 것입니다 수 있습니다 : # 000 URL을 (css ("background", "url (images/bg.jpg) top center no-repeat;") fadeIn ("slow"); no-repeat center top # 000 "). fadeIn ("slow "); ' – Reflective
아직도 답장을 보내 주셔서 감사합니다. – mmz