forked from dushyant10111/bootstrap-multiselect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
require.html
160 lines (142 loc) · 8.89 KB
/
require.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Multiselect</title>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="docs/css/bootstrap-3.3.2.min.css" type="text/css">
<link rel="stylesheet" href="docs/css/prettify.min.css" type="text/css">
<link rel="stylesheet" href="dist/css/bootstrap-multiselect.css" type="text/css">
<link rel="stylesheet" href="docs/css/bootstrap-example.min.css" type="text/css">
<script data-main="dist/js/" src="docs/js/prettify.min.js"></script>
<script data-main="dist/js/" src="docs/js/jquery-2.1.3.min.js"></script>
<script data-main="dist/js/" src="docs/js/bootstrap-3.3.2.min.js"></script>
<script data-main="dist/js/" src="docs/js/require-2.3.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
window.prettyPrint() && prettyPrint();
});
</script>
</head>
<body data-spy="scroll" data-target="#affix">
<a href="https://github.com/davidstutz/bootstrap-multiselect"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div class="container">
<div class="row">
<div class="col-md-3" id="affix">
<ul class="nav nav-pills nav-stacked sidebar" data-spy="affix" style="margin-top: 40px;">
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="index.html#configuration-options">Configuration Options</a></li>
<li><a href="index.html#templates">Templates</a></li>
<li><a href="index.html#styling">Styling</a></li>
<li><a href="index.html#methods">Methods</a></li>
<li><a href="index.html#further-examples">Further Examples</a></li>
<li><a href="index.html#post">Server-Side Processing</a></li>
<li><a href="index.html#keyboard-support">Keyboard Support</a>
<li class="active"><a href="#require-js">Require JS</a>
<li><a href="index.html#faq">Frequently Asked Questions</a></li>
<li><a href="index.html#known-issues">Known Issues</a></li>
<li><a href="tests/SpecRunner.html">Tests</a></li>
<li><a href="index.html#license">License</a></li>
</ul>
</div>
<div class="col-md-9">
<div class="page-header">
<h1>Bootstrap Multiselect <img src="https://travis-ci.org/davidstutz/bootstrap-multiselect.svg?branch=master" alt="Build Status" /></h1>
<h2 style="display:none;" id="require-js"></h2>
</div>
<p class="alert alert-info">
Please consult the <a href="#faq">FAQ</a>, the <a href="https://github.com/davidstutz/bootstrap-multiselect/issues">Issue Tracker</a> or <a href="http://stackoverflow.com/questions/tagged/bootstrap-multiselect">StackOverflow</a> before creating a new issue; when creating an issue or a pull request, read <a href="#how-to-contribute">how to contribute</a> first.
</p>
<div class="well well-sm">
<p><b>Consider making a donation to support the development of this plugin:</b></p>
<div class="text-center">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="V95Q7QK6JY32Q">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
<a href="http://davidstutz.de/donate/" class="small pull-right">Why Donate?</a>
<div class="clearfix"></div>
</div>
<div class="page-header">
<h2 id="require-js">Require JS</h2>
</div>
<p>Getting started with Bootstrap Multiselect and <a href="http://requirejs.org/" target="_blank">Require JS"</a>:</p>
<ol>
<li>
<h3>Link the CSS Files</h3>
<pre class="prettyprint linenums">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>
</pre>
</li>
<li>
<h3>Include Require JS</h3>
<pre class="prettyprint linenums">
<script data-main="dist/js/" src="js/require.min.js"></script>
</pre>
</li>
<li>
<h3>Create a Select</h3>
<p>
Now simply use HTML to create your <code>select</code> input which you want to turn into a multiselect. Remember to set the <code>multiple</code> attribute as to get a real multiselect - but do not worry, the plugin can also be used as usual select without the <code>multiple</code> attribute being present.
</p>
<pre class="prettyprint linenums">
<!-- Build your select: -->
<select id="example-getting-started" multiple="multiple">
<option value="cheese">Cheese</option>
<option value="tomatoes">Tomatoes</option>
<option value="mozarella">Mozzarella</option>
<option value="mushrooms">Mushrooms</option>
<option value="pepperoni">Pepperoni</option>
<option value="onions">Onions</option>
</select>
</pre>
</li>
<li>
<h3>Call the Plugin</h3>
<p>
In the end, simply call the plugin on your <code>select</code>:
</p>
<p class="alert alert-info">
Note that in this example, jQuery is included manually due to the file structure of this documentation; however this is not necessary.
</p>
<div class="example">
<script type="text/javascript">
require(["bootstrap-multiselect"],function(purchase){
$('#example-getting-started').multiselect();
});
</script>
<select id="example-getting-started" multiple="multiple">
<option value="cheese">Cheese</option>
<option value="tomatoes">Tomatoes</option>
<option value="Mozzarella">Mozzarella</option>
<option value="Mushrooms">Mushrooms</option>
<option value="Pepperoni">Pepperoni</option>
<option value="Onions">Onions</option>
</select>
</div>
<div class="highlight">
<pre class="prettyprint linenums">
<!-- Initialize the plugin: -->
<script type="text/javascript">
require(['bootstrap-multiselect'], function(purchase){
$('#example-getting-started').multiselect();
});
</script>
</pre>
</div>
</li>
</ol>
<hr>
<p>
© 2012 - 2018
<a href="http://davidstutz.de">David Stutz</a>, <a href="https://davidstutz.de/impressum/">Impressum</a>, <a href="https://davidstutz.de/datenschutz/">Datenschutz</a> - dual licensed: <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License v2.0</a>, <a href="http://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</a>
</p>
</div>
</div>
</div>
</body>
</html>