New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to import jQuery into global namespace (for Semantic UI) #327
Comments
Ok, this seemed to do a trick, when I put this code into my main import jquery from 'jquery';
global.$ = jquery;
global.jQuery = jquery;
require('./semanticui'); |
Thanks for this @tomitrescak I decided to // config.js
import jquery from 'jquery';
global.$ = jquery;
global.jQuery = jquery;
require('semantic-ui-css/semantic.css');
require('semantic-ui-css/semantic.js'); |
I've had issues integrating jQueryUI, so here's how I did it. It uses the jquery-ui module. // config.js
import jquery from "jquery";
import jQueryAutocomplete from "jquery-ui/ui/widgets/autocomplete";
import jQueryDatepicker from "jquery-ui/ui/widgets/datepicker";
jquery.autocomplete = jQueryAutocomplete;
jquery.datepicker = jQueryDatepicker;
global.$ = jquery;
global.jQuery = jquery; |
This was referenced Apr 15, 2021
This was referenced Aug 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I'm trying to use Semantic UI and I'm fading all css from it. The problem is that Semantic UI expects jQuery in the global namespace. I tried following to import it, but I still get 'jQuery' is not defined.
Any idea how can this be achieved ?
The text was updated successfully, but these errors were encountered: