File: requirejs_v1.html

package info (click to toggle)
jquery-typeahead.js 2.11.0%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,028 kB
  • sloc: javascript: 7,564; makefile: 11
file content (71 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
71
<!doctype html>

<html lang="en">
<head>
    <meta charset="utf-8">

    <title>Typeahead Requirejs_v1 Demo</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" href="../../src/jquery.typeahead.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.22/require.min.js"></script>

    <script>
        requirejs.config({
            waitSeconds: 0,
            baseUrl: '',
            paths: {
                'jquery': 'https://code.jquery.com/jquery-2.2.0.min',
                'jquery-typeahead': '../../dist/jquery.typeahead.min'
            },
            shim: {
                'jquery-typeahead': {
                    deps: ['jquery']
                }
            },
            priority: [
                'jquery'
            ]
        });

        requirejs(["requirejs_v1"]);
    </script>
</head>
<body>

<div style="width: 100%; max-width: 800px; margin: 0 auto;">

    <h1>Load Typeahead with RequireJS Demo</h1>

    <ul>
        <li>
            <a href="http://www.runningcoder.org/jquerytypeahead/documentation/">Documentation</a>
        </li>
        <li>
            <a href="http://www.runningcoder.org/jquerytypeahead/demo/">Demos</a>
        </li>
    </ul>

    <form>
        <div class="typeahead__container">
            <div class="typeahead__field">
                <div class="typeahead__query">
                    <input class="js-typeahead"
                           name="search_items"
                           autofocus
                           autocomplete="off">
                </div>
                <div class="typeahead__button">
                    <button type="submit">
                        <span class="typeahead__search-icon"></span>
                    </button>
                </div>
            </div>
        </div>
    </form>

</div>

</body>
</html>