I had a BackboneJs + jquery code which now I am trying to modularize using requireJs. In my code I am using additional jquery plugins like nanoscroller etc.
Earlier just calling the script was enough:
<script type="text/javascript" src="../javascript/jquery.nanoscroller.js"></script>
Now I am trying to call the script by:
define([
'jQuery',
'Underscore',
'Backbone',
'text!templates/landingTemplate.html',
'library/jquery/jquery.nanoscroller.js'
], function($, _, Backbone, LandingTemplate){
var LandingView = Backbone.View.extend({
But I am getting following error:
Error: jQuery is not defined
Source File: http://localhost:8080/sample/Main%20App/Backbone%20+%20Require.js%20Impl/js/library/jquery/jquery.nanoscroller.js
I have tried couple of things: Using "require" instead of "define" but it didnt work. I am not sure what am I missing here. Kindly Help.
Thanks, Komal.