how to break out of .each() iteration
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3267508/nested-jquery-each-continue-break">Nested jQuery.each() - continue/break</a>  </p>
</blockquote>



<p>Here is my code:</p>

<pre><code>var steps = $("div#f");
steps.each(function () {
    var s = $(this);
    var cs = $(this).find(".Cm");
    cs.each(function () {
        var tc = $(this);
        var err = tc.attr("h");
        if (err == false) {
            this.c = err;//this.c is a global variable
            return this.c;
            break;//here is where the error is being thrown
        }
        else {
            this.c =  {"Eval": err, "S": s, "Cm": tc};
            return this.c;
        }
    });
});
</code></pre>

<p>I'm using an <code>.each()</code> iteration to collect values. I thought it functioned like a loop so i thought id use a <code>break</code> statement to break out. This is throwing an "illegal" error. Does anyone know how to break out of an <code>each</code> iteration?</p>
