hernansartorio / jquery-nice-select

A lightweight jQuery plugin that replaces native select elements with customizable dropdowns.
http://jqueryniceselect.hernansartorio.com
957 stars 286 forks source link

RequireJS/AMD support #54

Open tigusigalpa opened 7 years ago

tigusigalpa commented 7 years ago

Hi! if its possible - can you integrate RequireJS support in core?

darkguy2008 commented 6 years ago

I want to use this with NPM + ES6 and I'm having issues too. It doesn't seem to work, it says Uncaught TypeError: $(...).niceSelect is not a function :(

tigusigalpa commented 6 years ago

@darkguy2008 just replace function($) at the start to define(["jquery"], function ($) {'use strict'; and add an external ) at the end. I dont have a lot of time to commit, but this is a resolver