Why not give the <footer> an id, then use the DOM to replace the innerHTML for the object when you reach the last page.
for example, if your use
<script type="text/javascript">
<footer id="xx">
document.getElementById('xx').innerHTML = 'Hello From The New Footer!';
</footer>
</script>