Skip to Main Content
MooTools 1.3 Cookbook
book

MooTools 1.3 Cookbook

by Jay L Johnston
July 2011
Intermediate to advanced content levelIntermediate to advanced
276 pages
5h 11m
English
Packt Publishing
Content preview from MooTools 1.3 Cookbook

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler

Publisher Resources

ISBN: 9781849515689Other