On page load, I am checking to see if a person is registered. If he is then, I will enable a link otherwise disable the link.
I tried the following , but it doesnt work.
Why don't you use the javascript:void(0) ?
Link
like
var href = 'javascript:void(0)'; var status = $('#status').val(); // ?? if (status == 'Registered'){ href = 'available link'; } $('#addlink').attr('href',href);