Please tell me, you need to hide the link in the code so that it is not visible. I tried it, but you do it

$(function(){ $('#link42').click(function(){ window.open("http://site.ru/"); }); }); 
 .link { cursor: pointer; color: #00f; text-decoration: underline; } 
 <p>Вообще, это не самый лучший вариант, но если хочется, то кликни по <span id='link42' class='link'>псевдо-ссылке</span>.</p> <p>Вообще, это не самый лучший вариант, но если хочется, то кликни по <span id='link42' class='link'>псевдо-ссылке</span>.</p> 

  • I mean in the code? - Sasuke
  • @ We will leave this sanitation, tell me why you can only follow the first link? - Vladislav Samokhin
  • one
    The id should be unique and you have it at the same 2 elements. - Sasuke

1 answer 1

  <a style='font-size: 14px;color: #777777;' id='kurl' href='javascript: goToPage(".$id.");'><i class='fas fa-trash-alt'></i></a> <script type= 'text/javascript'> function goToPage(tx) { var tx = '".$id."'; var url = document.getElementById('kurl'); document.location.href = '/fun/awg.php/?id=".$id."&id_t=".$_GET['id']."'; } </script>