Hi!!
I have the following problem:
I have a custom block with two jquery files and jquery is only working in the principal page, when I go inside into a course jquery doesn't work.
I put the following lines in version.php:
$PAGE->requires->js('/lib/jquery/jquery-1.7.2.min.js', true);
$PAGE->requires->js('/lib/jquery/main.js', true);
I tried putting this lines in the principal block file:
$PAGE->requires->js('/lib/jquery/jquery-1.7.2.min.js');
$PAGE->requires->js('/lib/jquery/main.js');
Or:
$PAGE->requires->js('/lib/jquery/jquery-1.7.2.min.js', true);
$PAGE->requires->js('/lib/jquery/main.js', true);
But with these lines moodle doens't load...
Where is the error? How can I fix it?
Thanks a lot!!