How to have differents placeholders with two select2

烈酒焚心 提交于 2019-12-24 15:53:41

问题


Test on http://jsfiddle.net/7J8Ag/31/. With :

 var opts=$("#select1").html(), opts2="<option></option>"+opts;
 $("select.populate").each(function() { var e=$(this); e.html(e.hasClass("placeholder")?opts2:opts); });

I have correctly two differents "placeholders", but the list in #select0 is the same of #select1. So it's not ok.

I don't know, practically, to have two differents "placeholders" in two differents select2.

来源:https://stackoverflow.com/questions/21072525/how-to-have-differents-placeholders-with-two-select2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!