Home  >  Article  >  Web Front-end  >  How to write jquery to exit each loop_jquery

How to write jquery to exit each loop_jquery

WBOY
WBOYOriginal
2016-05-16 16:58:06975browse

Just return false in the callback function, most jq methods are like this
============================== ======
Returning 'false' will stop the loop (just like using 'break' in a normal loop).
Return 'true' to jump to the next loop (just like using 'continue' in a normal loop).

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn