Grab text on page and insert it into variable jquery
<p>I would like to target the text from the HTML below between the closing <code>&lt;/span&gt;</code> tag and closing <code>&lt;/h2&gt;</code> tag using jquery and insert the text value, in this case it would be "Hello World", into my <code>s.pageName=" "</code> traffic variable.</p>

<p>I don't know where to begin to solve this problem? Please let me know what info you need to help</p>

<p>This is my HTML:</p>

<pre><code>&lt;div class="portletTitleWrap"&gt;
    &lt;div class="portletTitle"&gt;
        &lt;div class="title"&gt;
            &lt;h2&gt;&lt;span class="siteTitle"&gt;Homepage&lt;/span&gt; Hello World&lt;/h2&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>This is my javascript snippet that I would like to populate <code>s.pageName=""</code> dynamically with Hello World. This value will change from page to page which is why it would need to be dynamic.</p>

<pre><code>&lt;script language="JavaScript" type="text/javascript"&gt;
s.pageName = ""
var s_code = s.t();
if (s_code) document.write(s_code)
&lt;/script&gt;
</code></pre>
