(function ($) {
    $.field_servicecategory = function (element, options) {
        let defaults = {
        }
        let plugin = this;
        plugin.settings = {}
        let $element = $(element);
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            $element.find('.list-servicecategory').select2();
        };
        plugin.example_function = function () {
        };
        plugin.init();
    }

    $.fn.field_servicecategory = function (options) {

        return this.each(function () {

            if (undefined == $(this).data('field_servicecategory')) {
                let plugin = new $.field_servicecategory(this, options);
                $(this).data('field_servicecategory', plugin);
            }
        });
    }
})(jQuery);