I have the following code:
function showAccessRequests_click()
{
var buttonValue = $("#showAccessRequests").val();
if (buttonValue == "Show")
{
$(".hideAccessRequest").removeClass("hideAccessRequest");
$("#showAccessRequests").val("Hide");
}
else
{
$(".hideAccessRequest").addClass("hideAccessRequest");
$("#showAccessRequests").val("Show");
}
}
This script removes a class fine but it does not want to add the class. Can you see any issues with this code?