Answer the question
In order to leave comments, you need to log in
How to connect jQuery and jQuery UI (or another library using jQuery) at the same time when working with modules (npm)?
Good afternoon!
Can't connect and use jQuery UI. Sample code below:
var $ = require('jquery');
var ui = require('jquery-ui');
$('#id').slider();
gulp.task('scripts', () => (
gulp.src('app/slides/index.js')
.pipe(plumber({errorHandler: errorHandler}))
.pipe(changed(paths.scripts))
.pipe(babel())
.pipe(webpack())
.pipe(rename((path)=>{
path.basename = 'index';
}))
.pipe(gulp.dest(paths.scripts))
));
Answer the question
In order to leave comments, you need to log in
var $ = require('jquery');
require('jquery-ui/ui/widgets/slider');
$('#id').slider();
may be
var window.$ = require('jquery');
var window.ui = require('jquery-ui');
$(function(){
$('#id').slider();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question