The documentation is either terrible or I'm missing something. I'm trying to add an error class to a select2 box for form validation. It's just a 1px red border.
I found the containerCssClass
method in the documentation, but I'm not sure how to apply it.
I have tried the following with no luck:
$("#myBox").select2().containerCssClass('error');
#myBox
is ?????? Is it the select object or the subsequently created select2 span elements????? – Drop