O'Reilly logo

MooTools 1.3 Cookbook by Jay Larry G. Johnston

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 3. And on the 8th Day: Creating HTML Elements

Writing hypertext markup, HTML is like creating a house that guests will enjoy when they visit. But do guests not open and close doors? We also cook for our guests, creating items that were not previously there. In this chapter we will cook up some HTML elements in the following ways:

  • Creating new elements
  • Injecting new elements
  • Creating new form elements

Raw JavaScript contains methods for creating and injecting HTML elements. When we use those elements, the thought may occur that the syntax for these useful methods is not quite easy to remember. The syntax for creating elements in MooTools is quite easy to follow and even easier to memorize.

Creating a DIV with a border on it

Before injecting any ...

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