css and javascript

css and javascript

by badi azze -
Number of replies: 1

hi 

i have finished my plugin it's look very simple now i want it to look good and nice what can i do for that CSS and JAVASCRIPT and how to use them 

thanks

Average of ratings: -
In reply to badi azze

Re: css and javascript

by Priya Shanu -

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.)