   the page loads, or whenever a matching fragment is [updated through Up.js](/up.replace)
   later.
 
-  If you have used Angular.js before, this resembles [Angular directives](https://docs.angularjs.org/guide/directive).
+  If you have used Angular.js before, this resembles
+  [Angular directives](https://docs.angularjs.org/guide/directive).
 
 
   \#\#\#\# Integrating jQuery plugins

  `up.compiler` is a great way to integrate jQuery plugins.
  Let's say your Javascript plugin wants you to call `lightboxify()`
  on links that should open a lightbox. You decide to
  do this for all links with an `[rel=lightbox]` attribute:

      <a href="river.png" rel="lightbox">River</a>
      <a href="ocean.png" rel="lightbox">Ocean</a>

  This Javascript will do exactly that:

      up.compiler('a[rel=lightbox]', function($element) {
        $element.lightboxify();
      });


###*
Enhancing elements
==================

Up.js keeps a persistent Javascript environment during page transitions.
If you wire Javascript to run on `ready` or `onload` events, those scripts will
only run during the initial page load. Subsequently [inserted](/up.replace)
page fragments will not be compiled.

Let's say your Javascript plugin wants you to call `lightboxify()`
on links that should open a lightbox. You decide to
do this for all links with an `lightbox` class:

    <a href="river.png" class="lightbox">River</a>
    <a href="ocean.png" class="lightbox">Ocean</a>

You should **avoid** doing this on page load:

    $(document).on('ready', function() {
      $('a.lightbox').lightboxify();
    });

Instead you should register a [`compiler`](/up.compiler) for the `a.lightbox` selector:

    up.compiler('a.lightbox', function($element) {
      $element.lightboxify();
    });

The compiler function will be called on matching elements when
the page loads, or whenever a matching fragment is [updated through Up.js](/up.replace)
later.

@class up.syntax
###
