I have a simple jQuery question.
How come I can’t do this?
$("<div class='flora'></div>").insertBefore('</body>');
I just want to add a new div at the end of the HTML page. So I thought I’d use the .insertBefore method, but jQuery seems to not like to target the </body> tag.
thoughts?
Thanks!
Try something like
And if you really want to append before something… you can use the before() method.