Change the way html is added to node in js
That's really strange. The old and the new code should work exactly the same. jQuery bug?
It might just be, but this definitely fixes the issue.
I've never come across the way it was done here before though, always been shown to do it the way I have done.
The jQuery documentation states, that the original code should still work.
But, as I said: both versions should actually work the same.
It is odd.