I have an unordered list, and I am trying to insert an element at the end
jQuery("<li>").text(" | Billed (14)").appendTo('.subsubsub')
However, I would like it to be formated with the following
| <a href=''>Billed <span class='count'>(14)</span></a>
But when I do:
jQuery("<li>").text(" | <a href=''>Billed <span class='count'>(14)</span></a>").appendTo('.subsubsub')
It just prints the entities instead of parsing them.
You must use
.html()to inject html.