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 72 73 74
|
<!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">
<span class="typeahead__query">
<input class="js-typeahead-input"
name="search_items"
type="search"
autofocus
autocomplete="off">
</span>
<span class="typeahead__button">
<button type="submit">
<span class="typeahead__search-icon"></span>
</button>
</span>
</div>
</div>
</form>
</div>
</body>
</html>
|