Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (41 loc) · 1.63 KB
/
Copy pathindex.html
File metadata and controls
59 lines (41 loc) · 1.63 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!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">
<head>
<title>Pobquery test</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script src="jquery-2.2.3.min.js"></script>
<script src="../pobNode.js"></script>
<script>
$(document).ready(function () {
logo= new pobNode('img');
logo.addAttr('src','http://www.freemedialab.org/wiki/lib/tpl/dokuwiki/images/logo.png');
logo.after='<br>';
logo.attach('body');
button1 = new pobNode('button');
button1.setHtml('Button 1');
button1.attach('body');
button2 = new pobNode('button');
button2.setHtml('Button 2');
button2.attach('body');
button1.jq.bind('click',function(){ $('body').append('<p>Clicked 1</p>')});
button2.jq.bind('click',function(){ $('body').append('<p>Clicked 2</p>')});
//Optional...Detecting if is mobile (touch and user agent)
if (!hasTouch())
{
$('body').append('<p>Your browser not support touch.</p>');
}else{
$('body').append('<p>Your browser support touch.</p>');
if( isMobile.Android() ) $('body').append('<p>Your device is Android.</p>');
if( isMobile.BlackBerry() ) $('body').append('<p>Your device is BlackBerry.</p>');
if( isMobile.iOS() ) $('body').append('<p>Your device is iOS.</p>');
if( isMobile.Opera() ) $('body').append('<p>Your device is Opera mini.</p>');
if( isMobile.Windows() ) $('body').append('<p>Your device is a Windows.</p>');
}
});
</script>
</head>
<body>
<h3>Test</h3>
</body>
</html>