I use $('.posts').append('test') to add 'test' as the last element in the posts div. How can I make it the first element?
$('.posts').append('test')
div
Use with .prepend() like
.prepend()
$('.posts').prepend('test');
Try this LINK
You use prepend()
prepend()
('.posts').prepend('test');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!