How do I enable external JavaScript in my Moodle page?
In the Moodle, while we use $PAGE->requires->js_init_call()
to activate JS, as defined in our plugin file module.js
, how to enable Javascript is external resources , which we usually include in the <head>
tags as:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>mypage</title>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"></script>
</head>
+3
source to share
2 answers