Hi,
how can I abort the jquery each
function?
$.each(big_test_object, function(i)
{
// some code
});
Thanks in advance!
Peter
Hi,
how can I abort the jquery each
function?
$.each(big_test_object, function(i)
{
// some code
});
Thanks in advance!
Peter
from the jquery each documentation
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.
$.each(big_test_object, function(i)
{
if(i == 'yourvalue') {
return false;
}
});