Using Require.js with jQuery
Hello ,
- I have folder called "scripts". And in this folder contains the following files :
- Require.js .
- jquery-2.0.0.js
- Main.js
- In the "Main.js" , I write the following code :
require.config({
paths: {
"jquery": "scripts/jquery-2.0.0"
}
});
require(["jquery"], function ($) {
$(function () {
alert('Hello World');
});
});
- in the "default.aspx" . I set the following line :
<script src="scripts/Require.js" type="text/javascript" data-main="scripts/Main"></script>
- I view browse the page . I get this error : "Object expected "
So What is wrong and how can I solve it ?
Thanks