Update a page fragment via AJAX

Give a link an up-target attribute to update a CSS selector with the same selector from the link's destination. No server-side changes required.

back.html
<a href="front.html" class="one" up-target=".one">
  Flip
</a>

<a href="front.html" class="two" up-target=".two">
  Flip
</a>
front.html
<a href="back.html" class="one" up-target=".one">
  &hearts;
</a>

<a href="back.html" class="two" up-target=".two">
  &spades;
</a>