Book Image

Mastering ArcGIS Server Development with JavaScript

By : Raymond Kenneth Doman
Book Image

Mastering ArcGIS Server Development with JavaScript

By: Raymond Kenneth Doman

Overview of this book

Table of Contents (18 chapters)
Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding jQuery to your app


So, our intern is starting to work with the jQuery-based app when he runs into his first problem. How does he make jQuery and Dojo play well together? For the answer to that, we can look at some of the lessons from Chapter 6, Charting Your Progress, when we added D3.js to our application.

Loading a copy of our D3.js app, we'll start by adding a reference to the jQuery library in our dojoConfig packages. Remember that it is the JavaScript configuration object that is loaded before we load the ArcGIS Javascript API. We'll add a package with the name and file location, but we'll also add a main property that will make the application load the jQuery library. You can download a copy of the jQuery library and place it in an accessible folder in your application, or you can make a reference to an external content delivery network (or CDN) that's hosting the library. Using an external reference to jQuery hosted by Google, it should look something like the following code...