I'm trying to use jQuery camera inside a page block, but I'm doing something wrong.
I added the camera.min.js into my custom theme folder Theme_folder/Magento_Theme/web/js/camera.min.js
Here's my requirejs-config.js in Theme_folder/Magento_Theme/web/js/requirejs-config.js
var config = {
map: {
'*': {
'camera': './js/camera.min'
}
},
shim: {
'camera': {
deps: ['jquery'],
exports: 'jQuery.camera'
}
}
};
And here's the js in the block:
require(['jquery', 'camera'], function(jQuery) {
jQuery(function(){
jQuery('#camera_wrap').camera({
alignmen: 'topCenter',
height: '36.341%',
minHeight: '134px',
loader : false,
pagination: false,
fx: 'simpleFade',
navigationHover:false,
thumbnails: false,
playPause: false
});
});
});