2017-04-12 66 views

回答

0

对于低于标准写作的道歉,我写了这个,而我累了。然而我注意到这个话题没有任何问题/答案,我终于明白了。

我觉得自己有点像一个schlub,因为没有及时搞清楚。

$('#element').select2().empty(); // empty the select2 
$('#element').select2({ placeholder: 'Select A Model', data: data }); // fill the existing select2 with the data