diff --git a/assets/genericDropdown.js b/assets/genericDropdown.js index 09b112f..ef08fd2 100644 --- a/assets/genericDropdown.js +++ b/assets/genericDropdown.js @@ -1,3 +1,7 @@ -$(el).find('select[name ="genericDropdown"]').change(function (event) { - $(this).closest('form').netteAjax(event); -}); \ No newline at end of file +(function ($) { + $.fn.genericDropdown = function (options) { + $(this).on('change', function() { + $(this).closest('form').netteAjax(event); + }); + } +})(jQuery);