In jQuery i have the following code
$("li#credit").trigger('click'); This code triggers the click event only on li that has id credit.
Now to do this using JavaScript
document.querySelectorAll("li#credit").click(); I am getting the error:
click() is not a function
The page I am working have multiple elements with id "credit"id="credit", I need to trigger a click event only on <li> that has id credit.