different append method in the jQuery

.append() puts data inside an element at last index .prepend() puts the prepending elem at first index

$('.a').append($('.c'));

<div class='a'>
  <div class='b'>b</div>
  <div class='c'>c</div>
</div>

$('.a').prepend($('.c'));

<div class='a'> 
  <div class='c'>c</div>
  <div class='b'>b</div>
</div>

.after() puts the element after the element $('.a').after($('.c'));

<div class='a'>
  <div class='b'>b</div>
</div>
<div class='c'>c</div> 

.before() puts the element before the element $('.a').before($('.c'));

<div class='c'>c</div>
<div class='a'>
  <div class='b'>b</div>
</div>

1