Unexpected behavior from append()
I want to add some elements when a button is pressed, but have strange results:
1) Why is it saying add_room() is not defined? This is of course not related to the question per say
2) Why is the text in the inspector coming up as "Price", "type: " etc ? So why the double quotes? This seems to be because a text node was appended, and again not really related to the main issue, which is:
3) Why is the appended code not interpreted as HTML?
Seems like only the first part is, before the first "+"
4) If I want to separate somehow HTML and JS, how could I do this? The above code forces me to have a lot of HTML in the js file.
Thanks for any info