I am developing a custom block which is to use jquery. I followed the steps in http://docs.moodle.org/dev/jQuery, which is essentially to include the following function in block_blockname.php:
It seems to load fine when using any of the older themes (I tested Standard, Fusion, Binarius, and SkyHigh). With those themes, Firebug shows that it loads up jquery-1.9.1.js, jquery-ui.js, and jquery-ui.css.
Howevery, when I change the theme to "Clean" (the new bootstrap-based theme), I get the following error:
Can not add jQuery plugins after starting page output!
Followed by a bunch of other line and file-specific errors. This happens if I load the block in the frontpage or a course page.
Any ideas? Is this a clean theme bug or am I doing something wrong?
I haven't tested it, but I wonder if it affects all bootstrap themes.
Thanks in advance,