jquery - Change multi select plugin placeholder -
i using http://wenzhixin.net.cn/p/multiple-select/ multi-select,filter select box. works fine, 1 thing feel difficult have different select boxes , each select box need different placeholder. initiating
<script type="text/javascript"> $(".multi-select-filter").multipleselect({ filter:true, width:"100%", placeholder : "select zone(s)" }); </script>
this repeating in pages. there way, can make call in common js file , change or override place holder value in individual pages?
you can use attribute on each element place required placeholder message <select class="multi-select-filter" placeholder="some message"></select>
in common file
$(".multi-select-filter").each(function () { $(this).multipleselect({ filter: true, width: "100%", placeholder: $(this).attr('placeholder') }); })
Comments
Post a Comment