MediaWiki:Gadget-Select2.js

mw.loader.load("https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css", 'text/css'); mw.loader.load("https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js");

$(document).ready(function {   mw.loader.using('jquery.select2', function { $('#js-example-basic-single').select2; }); });