tpl.PageBreaker.ajax
Last updated not available | Page history | Improve this page | Report an issue
Description¶
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.