#append in jquery
just learned that you can only append
a jquery array, not a single object in that array.
for example
$('#myh1').append('<h2>hi, h1. i am now your child.</h2>');
works.
this, on the other hand, does not:
$('#myh1')[0].append('<h2>hi, h1. i am not your child. i will make jquery unhappy.</h2>');
it will return TypeError: undefined is not a function
because append
is not a funciton on an individual item.
must be in array.