xxxxxxxxxx
.disable{
pointer-events:none;
}
with jquery add this class to you element to disable is and remove class to enable it
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<title>Disable Link</title>
</head>
<body>
<a id="myLink" href="https://www.example.com">Click me</a>
<script>
var link = document.getElementById("myLink");
link.setAttribute("disabled", "true");
link.style.pointerEvents = "none";
link.style.color = "gray";
link.style.textDecoration = "none";
</script>
</body>
</html>