-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo.html
32 lines (23 loc) · 1.11 KB
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery.fn.satisfy demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.js"></script>
<style type="text/css">
div { background: #EEE; padding: 10px; margin-bottom: 10px; border: 1px solid #000; }
ul { background: #333; color: #FFF; margin: 0; padding: .8em 0 .8em 2em; }
</style>
</head>
<body>
<script src="satisfy.js"></script>
<script>
/* TESTING TABLE */
jQuery.satisfy('table tr:5 td[innerHTML="aaa"]:3').appendTo('body');
/* TESTING <UL> */
jQuery.satisfy('div:3 ul:2 li[innerHTML="List item"]:3').appendTo('body');
/* WITHOUT JQUERY */
document.body.appendChild( satisfy('div em strong[innerHTML="Sans-jQuery!!!"]')[0] );
</script>
</body>
</html>