forked from mitchellrj/jquery.optimizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
53 lines (38 loc) · 774 Bytes
/
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
<html>
<head>
<title>jquery.optimizer example</title>
<style type="text/css">
body {
vertical-align: middle;
}
textarea {
height: 20em;
width: 40%;
}
#process {
width: 10%;
}
</style>
<script src="jquery.optimizer.js" type="text/javascript"></script>
<script type="text/javascript">
function doOptimize() {
var source = document.getElementById('input').value;
document.getElementById('output').value = jQuery.optimize(source);
}
</script>
</head>
<body>
<form action="#">
<textarea id="input">
$('#foo');
$('bla');
$('p #foo bar');
$('#foo p');
$('.class p #foo bar[attr="a b c"]')
</textarea>
<input type="button" id="optimize" value="Optimize" onclick="javascript:doOptimize();void(0);"/>
<textarea id="output">
</textarea>
</form>
</body>
</html>