I am attempting to assign a class to a specific li element based on its id. Below is the code I have tried:
function updateIndex(indexValue){
$('li[id=' + indexValue + ']').addClass("selectedQuestion")
}
However, I seem to be encountering an issue where the indexValue variable is not accessible within the li selector.