Commit c7184973 authored by Jeroen Deviaene's avatar Jeroen Deviaene

Add a placeholder using data-placeholder attribute

Add a placeholder using data-placeholder attribute so we don't need to create an entire function if we want to add placeholders to multiple multiselects.
parent f9290260
......@@ -138,6 +138,11 @@
function Multiselect(select, options) {
this.$select = $(select);
// Placeholder via data attributes
if (this.$select.attr("data-placeholder"))
options.nonSelectedText = this.$select.data("placeholder");
this.options = this.mergeOptions($.extend({}, options, this.$select.data()));
// Initialization.
......
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