forked from windmill/tutorial
-
Notifications
You must be signed in to change notification settings - Fork 1
/
windmill_tutorial.js
41 lines (33 loc) · 994 Bytes
/
windmill_tutorial.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$ = function(v){
return document.getElementById(v);
};
var erase = function(){
fleegix.fx.fadeOut($('messages'));
};
var writeClicked = function(){
$('messages').style.opacity = 0;
$('messages').innerHTML = 'Clicked the DIV and recorded it!';
fleegix.fx.fadeIn($('messages'));
setTimeout('erase()', 2000);
};
var writeTxtChanged = function(){
if ($('textFieldOne').value != ''){
$('messages').style.opacity = 0;
$('messages').innerHTML = 'Changed text and recorded it!';
fleegix.fx.fadeIn($('messages'));
setTimeout('erase()', 2000);
}
}
var init = function(){
var s = $('sub');
s.style.opacity = 0;
fleegix.fx.fadeIn(s);
if (navigator.userAgent.indexOf('Safari/41') > -1) {
document.body.style.backgroundColor = '#7cb3c0';
$('main').style.borderColor = '#16323b';
}
var d = $('recordedClickId');
fleegix.event.listen(d, 'onclick', writeClicked);
var t = $('btnSub');
fleegix.event.listen(t, 'onclick', writeTxtChanged);
};