append ul list with li inside
Hey.=)
Trying to append a ul with a few li inside and i can't get it right.
numberOfEntrance is the div that i want to contain the ul.
This works for me:
- $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") ) )
And when i try to append a multiple li:
- $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") + $("<li>").html("li2") ) )
Have no idea why when i try to append multiple li i get [Object object] and not a li with html in him.
Thank you anyone who try to help me.=)