<script type="text/javascript"> $(document).ready(function(){ $('td span').each(function(){ $(this).html("<a href='" + $(this).html() + "' />" + $(this).html() + "</a>"); }); }); </script>