Basic Usage
The plugin instance can be created by passing the dropdown element to the constructor. The argument can be a DOM element ID or the DOM element itself. For example, you can use the following code:
The second argument is an optional object that can be used to pass additional settings to the plugin constructor. Alternatively, you can use the data-settings attribute on the dropdown element to pass the settings.
const dropdown = document.querySelector('.dropdown'); const instance = new WPFormsMultiSelectCheckbox(dropdown); instance.init();
Alternatively, you can use the following code by passing the DOM element ID:
const instance = new WPFormsMultiSelectCheckbox('dropdown-id'); instance.init();