tpl.PageBreaker.ajax
Last updated Dec 9th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn moreDescription¶
This chunk used only if you enable pb_ajax parameter of PageBreaker plugin.
It is simply handle clicks on links with class load_page and sends ajax request to current page. After receiving response from plugin it changes old text block to new.
You need to specify id of element on webpage where content is.
<script type='text/javascript'>
var elem = '#content'; // HTML element on webpage in which will be loaded new block of text
$(document).ready(function () {
$('.load_page').live('click', function () {
var href = $(this).attr('href');
$.post(href, {
'action': 'PageBreakLoad'
}, function (data) {
$(elem).html(data);
})
return false;
})
})
</script>
Placeholders¶
There is no unusual placeholders in this chunk.
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn more