<r:include_javascript />

Javascripts should be stored in the  javascripts  directory. To include a file called  main.js , use this syntax:

<r:include_javascript name="main" />

Be sure not to include the .js extension when adding file names.

You can also include multiple scripts by separating them with commas. For example, if you wanted to add three files named  file-1.min.js, file-2.min.js, and file-3.js,add them like so:

<r:include_javascript name="file-1.min, file-2.min, file-3" />

Attribute Options:

async - Boolean value (true or false). Used to load javascript asynchronously.

defer - Boolean value (true or false). Used to defer loading javascript until other resources have been loaded.

Example:

<r:include_javascript name="file-1.min, file-3" async="false" defer="false" />

Last updated on June 23, 2015.

We welcome all questions, feedback and bug reports. If you're having an issue, we usually need the following information:

  • A brief description of the issue
  • A link to the page where you saw the issue
  • Screenshots that illustrate the problem - How do I take a screenshot?

Kindly email CleanSlate@mail.wvu.edu for help or use the form on the request help page.