Commit 5b5c0b59 authored by David Stutz's avatar David Stutz

Documentation for #160, #159.

parent 958a7e2d
......@@ -174,11 +174,21 @@ Rebuilds the whole dropdown menu. Selected options will still be selected.
**.multiselect('select', value)**
Selects an option by its value.
Selects an option by its value. Works also using an array of values.
**.multiselect('deselect', value)**
Deselects an option by its value.
Deselects an option by its value. Works also using an array of values.
**.multiselect('dataprovider', data)**
Build the select's options using the following scheme:
var data = [
{label: "ACNP", value: "ACNP"},
{label: "test", value: "test"}
];
$("#multiselect").multiselect("dataprovider", data);
## Additional Styling
......
......@@ -10,7 +10,7 @@
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css">
<link rel="stylesheet" href="css/prettify.css" type="text/css">
<script type="text/javascript" src="js/jquery-2.0.1.min.js"></script>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap-3.0.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="js/prettify.js"></script>
......@@ -681,7 +681,7 @@
</div>
</td>
<td>
Selects an option by its value.
Selects an option by its value. Works also using an array of values.
</td>
</tr>
<tr>
......@@ -701,20 +701,24 @@
</div>
</td>
<td>
Deselect an option by its value.
Deselect an option by its value. Works also using an array of values.
</td>
</tr>
<tr>
<td><code>.multiselect('dataprovider', data)</code></td>
<td colspan="2">
Provides data for building the select's options the following way:
<pre class="prettyprint linenums">
var data = [
{label: &quot;ACNP&quot;, value: &quot;ACNP&quot;},
{label: &quot;test&quot;, value: &quot;test&quot;}
];
$(&quot;#multiselect&quot;).multiselect('dataprovider', data);
</pre>
</td>
</tr>
</tbody>
</table>
<div class="page-header">
<h1>Further Examples</h1>
......@@ -1249,7 +1253,7 @@
<h1>Additional Styling</h1>
</div>
<p>For additionaly styling of the multiselect button the CSS class <code>multiselect</code> can be used.</p>
<style type="text/css">
<style media="screen" type="text/css">
.add-styling-1 .multiselect {
width: 500px;
text-align: left;
......
......@@ -516,7 +516,8 @@
this.buildFilter();
}
},
// Build select using the given data as options.
dataprovider: function(dataprovider) {
var optionDOM = "";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment