I'm working with backbone+requirejs+jquery and I have a problem with jquery plugin loading in my current html page (backbone html template precisly).
There is my require configuration:
require.config({
paths: {
// ... some code about backbone config
jquery: '/js/lib/jquery/jquery.min',
'jquery.camera' : '/js/jquery/jquery.camera'
},
shim: {
// ... some code about backbone config
'jquery.camera': ['jquery']
}
});
In my layout html page I have:
<script type='text/javascript' src='/js/jquery/jquery.camera.js'></script>
and in my template page I have:
<script type="text/javascript">
jQuery(function() {
jQuery('#test').camera({
...
</script>
Finally my browser mesg :
Uncaught TypeError: Object [object Object] has no method 'camera'
Do you have any idea?
In the same time I have another question, what is the best way to include some js code in our current page with backbone,requirejs, etc.
Thanks :)