Can someone explain to me how select2 works with Meteor? I am using zimme: select2-boostrap3-css and I do not know how to use it.
I checked both the original select2 github page and one of the package . The first explains how to use it without Meteor.
Am I just adding jQuery code to one of my * .js files to make it work?
In HTML:
<select class="input" id="clientName" name="clientName"> {{#each getClients}} <option value="{{clientName}}" data-id={{_id}}>{{clientName}}</option> {{/each}} </select>
In JS:
$("#clientName").select2();
Because it does not work.
When loading my page, I get this Uncaught TypeError: $(...).select2 is not a function error Uncaught TypeError: $(...).select2 is not a function .
source share