title: jQuery get .text() but not the text in span
body: <p>This is my jQuery part that makes my menu for my pages.</p>
  <pre><code>function fetchmenus() {
      $.getJSON('sys/classes/fetch.php?proccess=1', function(status) {
          // get line status
          $.each(status, function(i, item) {
              if (item.id == &quot;1&quot;) {
                  active = &quot;class='active'&quot;;
                  lastpageid = item.href;
              }
              else {
                  active = &quot;class='nonactive'&quot;;
              }
              $('&lt;li id=&quot;' + item.href + '&quot; ' + active + '&gt;&lt;a href=&quot;#' + item.href + '&quot;&gt;' + item.menuTitle + '&lt;span class=&quot;menuspan&quot; id=&quot;' + item.href + '&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;').appendTo('#menuarea ul#mainmenu');
  
          });
      });
  }
  </code></pre>
  <p>What I want to do is get the <code>item.menuTitle</code> in the <code>&lt;a</code> but before the <code>&lt;span&gt;</code>.</p>
  <p>Currently I do it on this way:</p>
  <pre><code>$('ul#mainmenu li').live('click', function(event) {
      //alert(this.id);
      $(&quot;li#&quot; + lastpageid).removeClass();
      fetchpage(this.id);
  
      $(&quot;#largemenutop&quot;).html($(this).text());
  
      $(&quot;li#&quot; + this.id).addClass(&quot;active&quot;);
      lastpageid = this.id;
  });;
  </code></pre>
  <p>Is there a better way to do this?</p>