結束 jQuery.each 的循環是通過設定 jQuery.each 的 callback 函數中返回 false;
而繼續下一個循環(即 continue ),是 return 非 false 值。亦適用於 .each。
|
|
官方說明:
We can break the
$.each()loop at a particular iteration by making the callback function return false. Returning non-false is the same as a continue statement in a for loop; it will skip immediately to the next iteration.
参考资料: