I'm using require-jquery.js and I'm trying to load the jsscrollpane plugin in my application.
I have this configuration in my index.html page (It's a single page application):
require( { paths: {
'ca': 'cafe/ca',
'casp': 'sp/sp',
'ko': 'cafe/lib/knockout/knockout',
'komap': 'cafe/lib/knockout/knockout.mapping',
'kopost': 'cafe/lib/knockout/knockout-postbox',
'jd': 'cafe/lib/jaydata/jaydata',
'jdKo': 'cafe/lib/jaydata/jaydatamodules/knockout',
'jdDeferred': 'cafe/lib/jaydata/jaydatamodules/deferred',
'jqscroll': 'cafe/lib/jsscrollpane/jquery.jscrollpane.min'
},
waitSeconds: 60,
shim: {
'jd': { exports: '$data', deps: [ 'cafe/lib/jaydata/datajs-1.0.3' ] },
'jdDeferred': { exports: '$data', deps: [ 'jd' ] },
'jqscroll': ['jquery']
}
..............
Then i try to call the plugin from a module:
define( [ 'jquery', 'ko','jqscroll' ], function( $, ko ,jqscroll) {
console.log(jqscroll);
}
But I keep getting undefined, what am I doing wrong?