Right now Facebook wants me to throw this ugly div at the top of my page directly under <body>
<div id="fb-root"></div>
I would like to avoid this by instead, appending it via JavaScript.
.append('<div id="fb-root"></div>');
This places it at the bottom of the page.
</head>
<body>
<header>test</header>
<div id="fb-root"></div>
</body>
How can I 'append' it to the top?
</head>
<body>
<div id="fb-root"></div>
<header>test</header>
</body>
Use prepend
method:
$('body').prepend('<div id="fb-root"></div>');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With