User:Frank Ralf/jQuery

< User:Frank Ralf
Revision as of 15:59, 6 November 2011 by Frank Ralf (talk | contribs) (Created page with "Some examples and proof of concept for using jQuery for enhancing Moodle usability. == Collapsible course list == <syntaxhighlight lang="javascript"> jQuery('.section h3').wrap...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Frank Ralf/jQuery.

Some examples and proof of concept for using jQuery for enhancing Moodle usability.

Collapsible course list

<syntaxhighlight lang="javascript"> jQuery('.section h3').wrapInner('<a href="#" />')

 .click( function(event) {
   event.preventDefault();
   jQuery(this).parent().find('ul.section').toggle();

}) </syntaxhighlight>

jQuery('ul.section').hide();