S5 Presentation template

Martin Reurings

Inline Script

<tag onclick="this.style.display='none';" />

Functions

function myFunction( object ) {
	alert("Hello " + object.tagName);
}
			

Events

Events are commonly used to react on user-input. Events are therefor of key importance when developing JavaScript.

Objects to functions

function myObject( object ) {
	this.object = object;
	this.myMethod = function( ) {
		alert("Hello " + this.object.tagName);
	}
}
			

Objects using several functions

function myMethod() {
	alert("Hello " + this.object.tagName);
}
			
function myObject( object ) {
	this.object = object;
	this.myMethod = myMethod;
}
			

Object Literal

function myObject( object ) {
	this.object = object;
}
myObject.prototype = {
	myMethod: function() {
		alert("Hello " + this.object.tagName);
	}
}
			

JS-doc

CSS-classes for state-keeping

Global event capturing