title: Define <a> inside <body> isnt work in jquery
body: <p>Hi online stackoverflowers</p>
  
  <p><strong>Updated</strong></p>
  
  <p>tries to get all links inside body it mustbe looks likes
  want to make this code working</p>
  
  <p>note this added after <code>]]&gt;&lt;/b:skin&gt;</code></p>
  
  <pre><code>var root = new RegExp(location.host);
      $('body a').each(function(){
  
          if(root.test($(this).attr('href'))){ 
              $(this).addClass('local');
          }
          else{
              // a link that does not contain the current host
              var url = $(this).attr('href');
              if(url.length &gt; 1)
              {
                  $(this).addClass('external');
              }
          }
      });
  </code></pre>
  
  <p>and trying to open all links with this class in new tab it doesnt work</p>
  
  <p>and my body tag </p>
  
  <pre><code>  &lt;body expr:class='&amp;quot;loading&amp;quot; + data:blog.mobileClass'&gt;
  </code></pre>
  
  <p>while trying with adding class working fine like this</p>
  
  <pre><code>$(".post-body a").each(function(){
  // for example
      $(this).addClass('bodylink');
  });
  </code></pre>
  
  <p>tried to define body by adding an ID</p>
  
  <pre><code>$("body").attr("id", "bodyid");
  $("#bodyid").each(function(){
  // for example
      $(this).addClass('bodylink');
      });
  </code></pre>