is it possible to check, if “toggle(‘slide’) == ready
like …
if(toggle silde != ready)
{
return false;
}
else
{
$('#div').toggle('slide', { direction: 'down' }, 450);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you should do is enclose your code in jquery’s onload handler, that executes only after the page loads and everything is okay to start doing scripting, something like this:
Here you tell jquery to execute your line after the page loads.
EDIT: you need to provide a callback to the function, jquery will call your callback when the effect finishes, check here: http://jsfiddle.net/Yn8He/
HTML:
JavaScript: