I am trying to load jQuery using Dojo AMD. which is working fine when I use Jquery CDN path Below the code.
<script type="text/javascript"
src="WidgetDownloadTest/lib/dojo/dojo/dojo.js"
data-dojo-config="async: true, packages: [
{ name: 'jquery', location: 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1', main: 'jquery' }
]">
</script>
however if I change the jquery path to Local machine (absolute path) . Jquery libaries(jquery-1.10.2.js,jquery-ui-1.10.4.custom.js,jquery-ui-1.10.4.custom.min.js) are placed in folders 'jquery/1.7.1'
<script type="text/javascript"
src="WidgetDownloadTest/lib/dojo/dojo/dojo.js"
data-dojo-config="async: true, packages: [
{ name: 'jquery', location: 'jquery/1.7.1', main: 'jquery' }
]">
</script>
Please help me on this. Thanks in advance.
Pradeep
Scripts mentioned in 'location' should be relative from the 'dojo.js' folder (in your case: WidgetDownloadTest/lib/dojo/dojo/dojo.js).
So if for example the jquery libraries exist in 'WidgetDownloadTest/lib/jquery/1.7.1' then the 'location' parameter should be set to:
location:'../../jquery/1.7.1'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.