This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI.add('moodle-block_codex_about-toggler', function(Y) { | |
// Define a name space to call | |
M.block_codex_about = M.block_codex_about || {}; | |
M.block_codex_about.toggler = { | |
init: function() { | |
// Delegate adds a single event listener rather than one per .codex_about_link | |
// There's no need to loop through and get the IDs and then pass them to the eventHandler as the targetted | |
// Node is available to the eventHandler in any case. | |
Y.delegate('click', this.toggleShow, Y.config.doc, '.codex_about_link', this); |