Registers a compiler that is run before all other compilers. The compiler function is called with each matching element as a jQuery object.
If you're not using jQuery, use up.macro()
instead, which calls
the macro function with a native element.
up.$macro('[content-link]', function($link) {
$link.attr(
'up-target': '.content',
'up-transition': 'cross-fade',
'up-duration':'300'
)
})
The selector to match.
The function to call when a matching element is inserted.
See compiler
argument for up.compiler()
.