I've confirmed the HTML with the selector element does exist in the DOM and yet even when I try the most basic of usage - $('.select2').select2(); - in Chrome version 32 I get the following error in my console:
Uncaught query function not defined for Select2 undefined
from line 1014 in the select2.js file, which is where I find the following code:
if (typeof(opts.query) !== "function") {
throw "query function not defined for Select2 " + opts.element.attr("id");
}
I've tried this in other browsers, namely IE11, Opera and Firefox and still get the same problem. I'm using the same version of jQuery as on the plugin site, version 1.7.1. I've also tried using older versions of the plugin and it still doesn't work.
Unfortunately the plugin site doesn't list any requirements so I don't know if I'm leaving a necessary resource out. I know it uses Bootstrap and my site doesn't, could that be the issue?
I'm obviously doing something wrong, but what? Thanks for the help in advance.