Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
trying to load jquery and javascript in moodle
Post Body

I am trying to jquery in moodle but i'm failing I have a manage.php file and a jquery.js file that are in the same folder:

I add this:

$PAGE->requires->js_call_amd('jquery','init');

in the page and this is my jquery file content:

              require(['jquery'], function($) {                  return {                            init: function() {                               console.log('ok');                            }                         }               }); 

I get the following error: GET http://13.81.59.55/lms/lib/javascript.php/1630666242/lib/jquery/jquery-3.4.1.min/.js net::ERR_ABORTED 404 (not found) require.min.js:5 Uncaught Error: Script error for "jquery/"

what am I doing wrong?

Author
Account Strength
80%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
251
Link Karma
97
Comment Karma
154
Profile updated: 12 hours ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago