$(document).on('documentLoaded', function() {
var forwardArrow = $('<div>')
.css({
position: 'absolute',
left: myArrowPosition.x,
top: myArrowPosition.y
})
.addClass('arrow');
// change pages when tapping on the arrow
forwardArrow.on('tap', function() {
$('#viewer').trigger('swipeleft');
});
$(document.body).append(forwardArrow);
// hide the arrows if the page is zoomed in
$(document).on('touchend', function() {
if (readerControl.isZoomedIn()) {
$('.arrow').hide();
} else {
$('.arrow').show();
}
});
});