I have a Laravel app that uses Twitter Bootstrap. Everything was working fine and then I implemented the Aloha WYSIWYG editor - http://www.aloha-editor.org/ which uses RequireJS.
I load the JS files in the following order:
- jQuery
- BootstrapJS file
- RequireJS
- AlohaJS
In that order, Aloha will work fine but the $().modal function won't work (TypeError is not a function...) I can see that bootstrap.min.js is loaded in Firebug though.
If I remove the RequireJS the bootstrap functions work fine.
I have had a look at the doco but what I don't understand is why my Bootstrap functions don't work even though the file is being loaded properly ? Do I have to load it in RequireJS ?
In the RequireJS doco, you should load RequireJS like that: <script data-main="/assets/main" src="/assets/lib/require.js"></script>
but the way Aloha tells us to implement doesn’t have any data-main
attribute, so where is the main.js file where the modules are being loaded?
Thank you