如何将链接从页面上的一个位置复制到另一个div

I've a Joomla website with K2 items and pagination.

I show the pagination on the bottom of page, and this will generate links to previous and next article on the bottom of the page (and it assign each link a specified css class).

I would ask if is there a (maybe php?) code to show these links also on the right bar of the website (so using a module, cause I've a plugin to insert php or javascript inside modules).

How can I copy that links showed on the bottom of page, into another place of the website?

You can get the href of the specific a tag using jquery's Attr.

A demo is shown below:

var x = $('.prev').attr("href");
$('nav div:first-child').text("Prev = " + x);
var y = $('.next').attr("href");
$('nav div:last-child').text("Next = " + y);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<nav>
  <div>Prev:</div>
  <div>Next:</div>
</nav>

<a href="www.facebook.com" class="prev">link prev</a>
<a href="www.google.com" class="next">link next</a>

</div>