css and javascript

Re: css and javascript

by Priya Shanu -
Number of replies: 0

what you need to customize a mod,block or a theme...?

here is the method you can use to add js and css in your plugin:

css folder and javascript folder (js) should be created inside that plugin(mod).

below syntax should also be included to add style and javascript in view.php page of that plugin.

$PAGE­>requires­>js(new moodle_url('/mod/modname/js/jquery.min.js'));

$PAGE­>requires­>css(new moodle_url('/mod/modname/css/style.css'));

$PAGE­>requires­>js(new moodle_url('/mod/modname/js/javascriptname.js'));

( jquery.min.js file should be kept under js folder.)