O'Reilly logo

Moodle JavaScript Cookbook by Alastair Hole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Moodle and Yahoo! User Interface Library (YUI)

In this chapter, we will cover:

  • Initializing the YUI 3 library
  • Loading YUI 3 modules
  • Loading YUI 2 modules from YUI 3
  • Attaching basic event handlers
  • Attaching advanced DOM event handlers
  • Implementing Event Delegation
  • Debugging with the YUI console

Introduction

There are a lot of common tasks that need to be performed when writing JavaScript. A large proportion of this simply involves dealing with differences between web browsers. The need for a way to hide or abstract the specifics of each browser into a standard interface gave rise to sets of tools known as JavaScript libraries. One of the leading libraries in use on the web today is the Yahoo! User Interface Library (YUI).

Moodle includes a copy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required