select2Custom
This module provides Javaabu's custom Select2 functionality through data attributes. This module requires Select2 to be available on the page.
To use the module, import it and initialize like so.
import { select2Custom } from '@javaabu/js-utilities';
select2Custom.init();
You can also manually bind select2Custom on an arbitary element using the bind()
method. The argument to the bind()
method must be a jQuery object. This can be useful for binding select2Custom on dynamic elements.
import { select2Custom } from '@javaabu/js-utilities';
select2Custom.bind($('.some-element'));