-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.html
65 lines (58 loc) · 2.01 KB
/
example.html
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
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<!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></title>
</head>
<body>
<script type="text/javascript" src="test/jquery.js"></script>
<script type="text/javascript" src="../jquery-jspath/jquery.jspath.js">
<!--
/**
* for this example to work you need to download
*
* - http://github.com/thatcher/jquery-jspath -
*
* into the same folder that holds this project.
*/
-->
</script>
<script type="text/javascript" src="jquery.loremipsum.js"></script>
<script type="text/javascript" >
(function($, _){
$(document).ready(function(){
//An Uppercased title for the document
document.title = "jQuery " + _.titled(3,false);
//5 words from the standard lorem ipsum list
$("#header00").text(_.words(5, true));
//5 words all ways the same
$("#sentence00").text(_.sentence());
//5 words all ways the same
$("#paragraph00").text(_.paragraph());
//2 'uncommon' words
$("#header01").text(_.titled(2));
//some random words for a list
$("#wordlist00 li").each(function(){
$(this).text(_.words(3));
});
//some paragraphs
$.each(_.paragraphs(5), function(count, para){
$("#content00").append("<p>"+para+"</p>");
});
});
})(jQuery, jsPath);
</script>
</body>
<h1 id="header00"></h1>
<p id="sentence00"></p>
<p id="paragraph00"></p>
<h2 id="header01"></h2>
<ul id="wordlist00">
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div id="content00"></div>
</html>