Jump to main content Jump to doc navigation

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.

See Also

  1. PageBreaker.PageBreaker
  2. tpl.PageBreaker.ajax
  3. tpl.PageBreaker.navigation

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

  • modmore
  • STERC
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Digital Penguin
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Snow Creative
  • Nick Clark
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard

Budget

$366 per month—let's make that $500!

Learn more