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. ...@@ -174,11 +174,21 @@ Rebuilds the whole dropdown menu. Selected options will still be selected.
**.multiselect('select', value)** **.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)** **.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 ## Additional Styling
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"> <link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css">
<link rel="stylesheet" href="css/prettify.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-3.0.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script> <script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="js/prettify.js"></script> <script type="text/javascript" src="js/prettify.js"></script>
...@@ -681,7 +681,7 @@ ...@@ -681,7 +681,7 @@
</div> </div>
</td> </td>
<td> <td>
Selects an option by its value. Selects an option by its value. Works also using an array of values.
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -701,21 +701,25 @@ ...@@ -701,21 +701,25 @@
</div> </div>
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="page-header"> <div class="page-header">
<h1>Further Examples</h1> <h1>Further Examples</h1>
</div> </div>
...@@ -1249,7 +1253,7 @@ ...@@ -1249,7 +1253,7 @@
<h1>Additional Styling</h1> <h1>Additional Styling</h1>
</div> </div>
<p>For additionaly styling of the multiselect button the CSS class <code>multiselect</code> can be used.</p> <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 { .add-styling-1 .multiselect {
width: 500px; width: 500px;
text-align: left; text-align: left;
......
...@@ -517,6 +517,7 @@ ...@@ -517,6 +517,7 @@
} }
}, },
// Build select using the given data as options.
dataprovider: function(dataprovider) { dataprovider: function(dataprovider) {
var optionDOM = ""; 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