Im Kopf die üblichen Angaben:
Quelltext (Grundgerüst)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Mocha Minimal 01</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/mocha.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-beta-1.2b1-compatible.js"></script>
<!--[if IE]>
<script type="text/javascript" src="scripts/excanvas-compressed.js"></script>
<style type="text/css"> html, body { height: 100%; overflow: auto; } </style>
<![endif]-->
<script type="text/javascript" src="scripts/mocha.js"></script>
</head>
Im body dann 2 Mocha-Fenster. Mocha-Fenster werden beim Aufruf der Datei automatisch angezeigt. Ein Mocha-Fenster hat:
<body>
<div class="mocha" id="Fenster1" style="width:300px; height:255px">
<h3 class="mochaTitle">Fenster 1</h3>
<p>Fensterinhalt</p>
</div>
<div class="mocha" id="Fenster2" style="width:300px; height:275px">
<h3 class="mochaTitle">Fenster 2</h3>
<p>Fensterinhalt</p>
</div>
</body>
</html>
In diesem Beispiel lassen sich die Mocha-Fenster verschieben und schließen. Außerdem kann die Größe verändert werden.
bla bla bla