Q:

Move all instances outside parent div jQuery

How do I quickly move the .btn-2018 outside .uc-articles-summary. I need to apply this fix to all elements with the class btn-2018.
My attempted fix

$('.btn-2018').each(function() {
  var $btn2018 = $('.uc-articles-summary > .btn-2018');
  $(this).parent().after($btn2018);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div class="uc-articles-summary">
  <p>
    &nbsp; Platform magazine has been shortlisted for two national awards after...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>
<div class="uc-articles-summary">
  <p>
    &nbsp; Another article explaining how to...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>
<div class="uc-articles-summary">
  <p>
    &nbsp; You are braver than you believe, stronger than you feel, and...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>

A:

I have changed your javascript to:
var $btn2018 = $(this);
$btn2018.closest('.uc-articles-summary').after($btn2018);

This way, you are telling jQuery to move the current element after it's own ancestor. I'm using .closest in case your button is deeply nested somewhere. If the button is always going to be an immediate child of .uc-articles-summary, then you can replace it with .parent.

$('.btn-2018').each(function() {
  var $btn2018 = $(this);
  $btn2018.closest('.uc-articles-summary').after($btn2018);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div class="uc-articles-summary">
  <p>
    &nbsp; Platform magazine has been shortlisted for two national awards after...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>
<div class="uc-articles-summary">
  <p>
    &nbsp; Another article explaining how to...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>
<div class="uc-articles-summary">
  <p>
    &nbsp; You are braver than you believe, stronger than you feel, and...
  </p>
  <a class="btn-2018" title="Platform shortlisted for two national awards ..." href="/articles/platform-shortlisted-for-two-national-awards">read more »</a>
</div>

