[Select2] TypeError: $select.select2 is not a function

[Select2] TypeError: $select.select2 is not a function

Forge Component
Published on 2015-06-29 by Eduardo Luís
2 votes
Published on 2015-06-29 by Eduardo Luís
I double checked my code and the example but i'm getting the error in browser inspector "TypeError: $select.select2 is not a function".
I'm using a normal multiselect.

i'm going to need a litlle bit more information, what jQuery version are you using? what browser? can you share the eSpace?
Hi Eduardo,

jQuery version: 1.8.3
Platform server:
Error in Chrome and Firefox, didn't tried on IE.
The multiple-select it's inside a webblock (like the example) and is consumed from other eSpace.
I'll try to reproduce the error in a new and clean eSpace to attach it here.

Thank on advance
Ok, i'll be waiting.

Meawhile, what settings are you using, if any?
Hi Eduardo,

I'm not passing any properties.
eSpace Attached.
The Multiple Select is not converted into Select2 :(

Weird, i just publish your eSpace in my cloud and it works fine (see the link).
This only appens with a multi select? Have you try with a standard select? And the examples page, it's working?
Well, it's working... now it was a problem created by my attempts to get it to work. I tried to change the JS inside Select2 and that's why it wasn't working in the example above. I replaced it with the original Select2 eSpace and started to work.
Now I'll try to place the multiselect inside a container with the layout of the original application and see if it works.
I put the web-block inside my app and doesn't worked.
I dont know if have anything to do with it but I have a built theme with a link to bootstrap css/js. Any JS conflict?

Well I was trying to use Select2 because I'm having a problem with "Chosen" Hidden Overflow inside a ExpandCollapse  container, and see if it would solve my problem... I have to get back to solve the "Chosen" problem and then I'll test Select2 again in another cenario.

Thanks for your help.
Well, a JS conflict would be my bet... i'll search in select2 community to see if something pops out.

Have you tried Silk UI Framework? It comes with a simpler (and older) version of select2. Maybe it's enought to solve your problem...