Using JQuery (which your What I have Tried example suggests you're using), there's the
disabled
property, which you can access as follows:
if ($('#follow').prop('disabled') {
}
You can also use prop() to set the property, by passing true or false as a second parameter:
$('#follow').prop('disabled',true);
You will find lots of other properties too. See
https://api.jquery.com/prop/[
^] for more info.