$('
isn't going to do what you think. It will try to create a DOM element, probably resulting in a
.
You'll have to build each element you need and piece them together, or operate on the html as a string using .html()
. I definitely recommend the first of these options.