tags:

views:

24

answers:

2

Hi,

i using jquery animation. i need to start the animation automatic when the site open. but in this jquery programmer put Click function. i want to remove the click function.but after i remove the fuction all animation are stopped.

http://web.enavu.com/tutorials/curtains-opening-animation-with-jquery/

can anyone help me Thanks

A: 

I assume you're talking about this:

// 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);  

});  

Try changing the word click, for each:

$('.curtain_wrapper').each(...
J-P
And, as per the article, make sure its in a DOM-ready "wrapper"...
J-P
+1  A: 

Just add $('.curtain_wrapper').trigger('click'); to the actual code !

Ninja Dude