Sign in

.loaddir

Sets the base URL that will be used for any subsequent calls to .load() which use relative URLs.

Syntax

neon.loaddir = url;

url

The base URL to use. This must include the trailing slash.

Description

.loaddir is a property rather than a method of Neon.

It is used to set the base URL for any subsequent calls to .load() which use relative URLs.

The URL supplied may be an absolute path, beginning with a slash, or a full URL, as in the following examples:

neon.loaddir = "/scripts/";
neon.loaddir = "http://example.com/js/";
neon.loaddir = "https://example.com/js/";

This property should be set on the global Neon object, rather than a clone of it (such as an object returned from the .select() method). It is suggested that this property is set right after the Neon library is initially loaded, although it is possible to re-set it immediately prior to a call to .load().