When I use this line
$("#edit-link-1").removeAttr("href");
It disables the link.
Now I want to enable the same link again. So I tried this line, but its kind of not working :(
$("#edit-link-1").addAttr("href",true);
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js">
</script>
<a href="#" id="edit-link-1">Link1</a>
<script type="text/javascript">
$("#edit-link-1").removeAttr("href");
$("#edit-link-1").addAttr("href",true);
</script>