I have a drupal site and i want to put all nodes url to all img tags! With bellow code can do this but all img linked to the same post url in the main pages, because take the link of the final post and put to all img. The Code i added to node.tpl.php file.
<script>
jQuery(document).ready(function($) {
$(document).ready(function() {
$('img').wrap("<a href='<?php print $node_url; ?>' </a>");
});
});
</script>
Thank you