Javascript update causing grief
<p>I am not a javascript developer by any means what so ever, however am stuck behind a JS problem.</p>

<p>If somebody could help me figure out what the problem may be would be amazing.</p>

<p>The bit of script that is falling over is:</p>

<pre><code>        $('button').each(function()
            {
            var curr_title = $(this).attr('title');

            if(curr_title.length &gt; 0)   $(this).button({ icons: { primary: curr_title } });
            else                        $(this).button();
            });
</code></pre>

<p>The error is </p>

<blockquote>
  <p>TypeError: Cannot read property 'length' of undefined.</p>
</blockquote>

<p>This works no problems at all in previous releases of the code. however the only change is updated Jquery.</p>

<p>Does anyone know if this is likely to be the problem?</p>

<p>Again. Apologies if im being stupid.</p>
