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
The element doesn't exist when your jquery is executing. You need to put your handlers inside a ready function.
$(function() {}); is the shorthand for $(document).ready(function() {});
$(function() {});
$(document).ready(function() {});