Reputation: 1313
I am using Moodle 3.1+. I am trying to develop a custom theme. In my theme jQuery is not working. I have tried by using $THEME->javascripts_footer
in theme config.php file and $PAGE->requires->js()
in frontpage.php. Please help
Upvotes: 0
Views: 2313
Reputation: 619
Try adding this line as a page setting on top
$PAGE->requires->jquery();
Upvotes: 1
Reputation: 11
Time has past since you asked for help, so I guess you have found the answer? For anyone else finding this post, then they will be happy to learn that Moodle 3.1 already uses jQuery. So if your theme is based on the Moodle default theme, which is Bootstrapbase, then there is nothing you need to do.
If your theme is not based on the Moodle default theme, then you need to read this Moodle Doc: jQuery
Upvotes: 1