title: jQuery working in console but not in original code
body: <p>I have tried the following code to add href to the a tag inside a td. it is working fine while i do in console. But when I try the same in my code it is not working. Can anyone tell me the reason?</p>
  
  <pre><code>&lt;script&gt;
      $("table tbody tr td a").attr('href','http://www.google.com');
   &lt;/script&gt;
  &lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;a &gt;Hai&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>