Below is the HTML code:
<a title="Login" data-href="/MyAccount/Access/Login"
data-title="Admin" data-entity="n/a"
id="loginLink" class="nav-button dialogLink"><b>Login</b></a>
<a title="Register"
data-href="/MyAccount/Access/Register"
data-title="Admin" data-entity="n/a"
id="registerLink" class="nav-button dialogLink"><b>Register</b></a>
Upon clicking #loginLink or #registerLink, I aim to disable the link and trigger a dialog script. Following function was created for this purpose:
$("#loginLink, #registerLink")
.click(function () {
$('#loginLink').prop('disabled', true);
$('#registerLink').prop('disabled', true);
dialog(this);
});
The dialog works as intended but fails to disable the links. Additionally, multiple dialog boxes appear upon repeated clicks on the buttons. Do you see any errors in my approach? I am unable to identify why it's not functioning correctly.