I have this part of code:
if(mess <= 0 || mess < -width) {
img_container.find('ul').animate({'margin-left' : mess + 'px' }, 1000);
}
I need this to stop working when mess is lesser the -width. How can I do this?
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.
See if you are getting width as string, if yes, use JS
parseIntfunction.If you are looking to stop animation syntax, see on http://api.jquery.com/stop/
It could be
img_container.find('ul').stop();This could help: