In category blog by default ten items are visible. I would like to replace a standard pagination with "Load more" button, so that clicking on it would show ten more items each time.
There is a blog layout override with the button.
<a id="btn-show-more" href="<?php echo JRoute::_('&start=' . ( ($this->pagination->pagesCurrent) * $this->pagination->limit) ); ?>"><?php echo JText::_( 'BUTTON_TEXT' ); ?></a>
div container
<div id="ajax-result"></div>
And the next script
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(document).on('click', '#btn-show-more', function () {
$.get($(this).attr('href'), function (responce) {
$('#ajax-result').html(responce)
});
return false;
});
})
</script>
As a result by clicking on the button the whole page with head section and etc. is loaded.
How to load items only?