[Solved] Ampersand in innerHtml() not being read correctly and validating in JS

.innerHTML isn’t a method. For jQuery, it’s $(this).html() or with the native API, it would be this.innerHTML. And use more sensible flow control constructs like a switch statement. Generally, .innerHTML comparison can be touchy. Use .text() instead when you’re only comparing the text content. $(“li.menu-item a.ui-link”).each(function() { switch ($(this).text()) { case “Accounts”: $(this).addClass(“AccountIcon”); break; case … Read more