That's what I have: <a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a>. <?=$arItem["LINK"]?> - it's an array, which contains some links. I need to add an extra hashtag parameter #nav-link to the end of each link. That's how I tried do it, but this code doesn't work:
<a id="likeLink" href=""><?=$arItem["TEXT"]?></a>
<script>
$(document).ready(function () {
$("#likeLink").attr("href", <?=$arItem["LINK"]?> + "#nav-link");
});
</script>
I don't know PHP quite well, but I think I need to add new array and return there all necessary links with hashtag and use this array in href.
Thanks for help!
<a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a>idissue.ids are supposed to be UNIQUE, so if this is in a loop you will havennumber ofid="likeLink". jQuery/javascript will not know which$("#likeLink")you are linking to.