Get style tag content with jQuery?
<p><strong>The problem</strong></p>

<p>I'm trying to get the content <strong><em>within the style tags</em></strong> but I can't get it to work.</p>

<p><strong>What the code does</strong></p>

<p>I use jQuery and try to get the style content with text() and html(). It does not work.</p>

<p><strong>My code</strong></p>

<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html lang="en-US"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;link rel="stylesheet/less" type="text/css" href="css/style.less"&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;

    &lt;style id="less:concepts-less-css-style" media="screen" type="text/css"&gt;
        body {
            padding: 10px;
            background: blue;
        }
    &lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;script src="js/less-1.1.5.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
        jQuery(document).ready(function($) {        
            var my_id = $('style').attr('id');
            var test = $('#less:concepts-less-css-style').text();
            var test2 = $('#less:concepts-less-css-style').html();
            alert(test + "#" + test2 + "#" + my_id);
        });
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
