Scalar 2 User's Guide

pageLoadComplete event

Scalar 2 performs a fair amount of DOM manipulation when each page loads. Consequently, relying on the page 'ready' or 'load' events might produce unexpected results.

Instead, Scalar 2 includes a custom event, 'pageLoadComplete'. This event will fire when Scalar 2 finishes manipulating the DOM.
$(document).ready(function() {
$('body').bind('pageLoadComplete',function() {
// Do something to the DOM, such as change the "This page is tagged by" text
$('.has_tags').prev().text('This is the new text');

This page has paths: