Select2: Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element.

Created on 19 Sep 2015  路  3Comments  路  Source: select2/select2

Even with Select2 4.0.0 we're seeing this error. As per the announcement we're no longer adding the input element.

html :

javascript :
$('.select2').select2({
minimumInputLength:2,
placeholder: $(this).attr('data-placeholder'),
ajax: {.....

Update :
Still works with <input type="hidden" class="select2" />

Is the documentation correct ? or am I missing something ?

p.s: select2 was installed today via bower

All 3 comments

Ok.. marking this as resolved.
There was an older version of select2 which was was conflicting here.
Resolved.

The above link was dead! (http://itfrustration.in/jquery-select2-ajax/)
Please give another example

Above link is spammer I think.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dnohr picture dnohr  路  3Comments

sanderhahn picture sanderhahn  路  4Comments

JuanWilde picture JuanWilde  路  3Comments

videsignz picture videsignz  路  3Comments

mauroschiappo picture mauroschiappo  路  3Comments