title: Chrome/jQuery Uncaught RangeError: Maximum call stack size exceeded
body: <p>I am getting the error "Uncaught RangeError: Maximum call stack size exceeded" on chrome. here is my jQuery function</p>
  
  <pre><code>$('td').click(function () {
          if ($(this).context.id != null &amp;&amp; $(this).context.id != '') {
              foo($('#docId').val(), $(this).attr('id'));
          }
          return false;
      });
  </code></pre>
  
  <p>Note that there are tens of thousands of cells in the page. However, I generally associate stack overflows with recursion and in this case as far as I can see there is none.</p>
  
  <p>Does creating a lambda like this automatically generate a load of stuff on the stack? is there any way round it?</p>
  
  <p>At the moment the only workaround I have is to generate the onclick events explicitly on each cell when rendering the HTML, which makes the HTML much larger.</p>