2010-07-19 11 views

답변

1

난 당신이에 대해 얘기하고 가정

// when user clicks inside the container... 
$('.curtain_wrapper').click(function(){ 

    //..animate the description div by changing it's left position to it's width (but as negative number)... 
    $(this).children('.description').animate({'left': -1*$(this).width()}); 

    //...animate the 2 curtain images to width of 50px with duration of 2 seconds... 
    $(this).children('img.curtain').animate({ width: 50 },{duration: 2000}); 

    //...show the content behind the curtains with fadeIn function (2 seconds) 
    $(this).children('.content').fadeIn(2000); 

}); 

each의 단어 click을 변경해보십시오 :

$('.curtain_wrapper').each(... 
+0

그리고 기사별로 DOM 준비가 된 "래퍼"에 있는지 확인하십시오. – James

0

그냥 실제 코드에 $('.curtain_wrapper').trigger('click');를 추가!

관련 문제