There is no direct property for setting something like Visible = true/false directly to the HTML tag, what you can use is the hidden property like this:
<a href="#" hidden>
Also, using javascript, you can change that whenever you want
<script>
$.ajax({
contentType: 'application/json',
dataType: 'JSON',
url: 'someURL',
type: 'GET',
success: function (data) {
if (data.flagFromDataBase === 1) {
document.querySelector('.Resource').style.visibility = "hidden"
} else {
document.querySelector('.Resource').style.visibility = "visible"
}
},
failed: function () {
console.log('Something went wrong :(';
}
});
</script>
Or if you want to disable/enable the button but keeping visible, you can use this instead of document.querySelector().style
, use this:
if(data.flagFromDataBase === 1) {
$('#myButton').prop('disabled', true);
} else {
$('#myButton').prop('disabled', false);
}