krulik
2/17/2014 - 9:38 AM

Execute now or later

Execute now or later

function execute (func, delay) {
	if (typeof(delay) !== "undefined") {
		window.setTimeout(func, delay);
	} else {
		func();
	}
}