问题
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