Open KingScooty opened 11 years ago
Are you loading jQuery via require.js (require('jquery')
)?
I installed the libraries with Bower and it works fine. Try that code:
// main.js
require.config({
paths: {
'jquery': 'vendor/jquery/jquery.min',
'jquery.transit': 'vendor/jquery.transit/jquery.transit'
},
shim: {
'jquery.transit': {
deps: ['jquery'],
exports: '$'
},
'jquery': {
exports: '$'
}
}
});
require(['app']);
// app.js
define(['jquery.transit'], function(){
$('#box').css({ translate: [60,30] });
});
I just can't seem to get this plugin to work using RequireJS. I've defined it as a module, and configured the require
path
andshim
parameter, still get undefined when trying to use it in a module.Any ideas?