-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.html
36 lines (30 loc) · 973 Bytes
/
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
33
34
35
<!DOCTYPE HTML>
<html lang="en-GB">
<head>
<meta charset="UTF-8">
<title>jListify demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="jquery.listify.js"></script>
</head>
<body>
<input id="my-list">
<input id="my-list-with-suggestions">
<a id="css-switcher" href="#">Toggle CSS</a>
<script>
$(document).ready(function()
{
$("#my-list").listify();
$("#my-list-with-suggestions").listify(["Alabama", "Birmingham", "Dakota", "Georgia", "Illinois", "New Jersey"]);
$("#css-switcher").click(function(e)
{
e.preventDefault();
if ($("head link").length) {
$("head link").remove();
} else {
$("head").append('<link rel="stylesheet" href="demo.css">');
}
});
});
</script>
</body>
</html>