How to import jQuery UI using ES6/ES7 syntax? -


i trying use jquery ui functionality in reactjs/redux application. i've imported both jquery , jquery ui using:

npm install jquery jquery-ui 

and i've tried:

import $ 'jquery'; import jquery 'query'; import jquery-ui 'jquery-ui'; 

however jquery ui not seem imported when try like:

componentdidmount() {   $('ol#mylist').selectable(); } 

i believe issue jquery ui. doing wrong? how can jquery ui work stack?

thank you!

i'm using partial import jquery-ui. mean import module needed jquery-ui:

import $ 'jquery'; import 'jquery-ui/themes/base/core.css'; import 'jquery-ui/themes/base/theme.css'; import 'jquery-ui/themes/base/selectable.css'; import 'jquery-ui/ui/core'; import 'jquery-ui/ui/widgets/selectable'; 

( take in account i'm using webpack https://webpack.github.io/, in other environment approach may differ)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -