Commit 669692e7 authored by David Stutz's avatar David Stutz

Example for #600.

parent 166d383f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "bootstrap-multiselect", "name": "bootstrap-multiselect",
"description": "Twitter Bootstrap plugin to make selects user friendly.", "description": "Twitter Bootstrap plugin to make selects user friendly.",
"homepage": "http://davidstutz.github.io/bootstrap-multiselect/", "homepage": "http://davidstutz.github.io/bootstrap-multiselect/",
"version": "0.9.14", "version": "0.9.13",
"keywords": [ "keywords": [
"js", "js",
"css", "css",
......
...@@ -177,9 +177,8 @@ ...@@ -177,9 +177,8 @@
} }
this.$select.hide().after(this.$container); this.$select.hide().after(this.$container);
this.options.onInitialized(this.$select, this.$container); this.options.onInitialized(this.$select, this.$container);
}; }
Multiselect.prototype = { Multiselect.prototype = {
......
...@@ -739,6 +739,52 @@ ...@@ -739,6 +739,52 @@
}); });
}); });
</script> </script>
</pre>
</div>
</td>
</tr>
<tr>
<td><code>onInitialized</code></td>
<td>
<p>
A function which is triggered when the multiselect is finished initializing.
</p>
<div class="example">
<script type="text/javascript">
$(document).ready(function() {
$('#example-onInitialized-button').on('click', function() {
$('#example-onInitialized').multiselect({
onInitialized: function(select, container) {
alert('Initialized.');
}
});
});
});
</script>
<div class="btn-group">
<select id="example-onInitialized" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
<option value="6">Option 6</option>
</select>
<button id="example-onInitialized-button" class="btn btn-primary">Activate!</button>
</div>
</div>
<div class="highlight">
<pre class="prettyprint linenums">
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$('#example-onChange').multiselect({
onChange: function(option, checked, select) {
alert('Changed option ' + $(option).val() + '.');
}
});
});
&lt;/script&gt;
</pre> </pre>
</div> </div>
</td> </td>
......
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