I can’t seem to figure this out :
$(".task:last").append(
$("<div/>", {class: 'clear'}) +
$("<div/>", {class: 'time', text: '3:30pm'}) +
$("<div/>", {class: 'clear'})
)
Unfortunately, this comes back as a bunch of [object, Object]. How do I append the HTML?
You can also try:
Using Array:
or
NOTE:
Not
class: 'clear', is should'class': 'clear'orclassName: 'clear'. Becauseclassis reserved keyword.