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?
<script>
$("table tbody tr td a").attr('href','http://www.google.com');
</script>
<table>
<tr>
<td><a >Hai</a></td>
</tr>
</table>
$(document).ready()