Jquery problem getting text from a script tag?
<p>I have this small HTML document:</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
&lt;html&gt;
    &lt;head&gt;
     &lt;title&gt;HTML Test&lt;/title&gt;

     &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;&lt;/script&gt;

     &lt;script type="text/javascript"&gt;
      $(document).ready(function()
      {
       $("script").each(function()
       {
        if($(this).attr("type") == "code")
        {
         alert($(this).text());
        }

       });
      });
     &lt;/script&gt;

    &lt;/head&gt;

    &lt;body&gt;

&lt;script type="code"&gt;
var Text = "Text";
&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>When run using Firefox the alert displays the text contents of the <code>&lt;script type="code"&gt;</code> tag. When run in IE8 it displays nothing.</p>

<p>Do you know why? I'm stumped.</p>
