2017-04-12 55 views

回答

0

對於低於標準寫作的道歉,我寫了這個,而我累了。然而我注意到這個話題沒有任何問題/答案,我終於明白了。

我覺得自己有點像一個schlub,因爲沒有及時搞清楚。

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