Web Development with jQuery®
Making a Server Request (^) ❘ 191 FIGURE 7-2 { "name" : "Canada", "iso2" : "CA", "iso3" : "CAN", "label" : "Province", "states" ...
(^192) ❘ CHAPTER 7 AJAX method as the json argument. All the data that you see in the JSON-formatted document is avail- able ins ...
Making a Server Request (^) ❘ 193 }); // Remove all of the options $('select#addressState').empty(); // Set the states... $.each ...
(^194) ❘ CHAPTER 7 AJAX FIGURE 7-3 You’ve added a new event to the <input> element with the id name addressButton. When yo ...
Loading HTML Snippets from the Server (^) ❘ 195 LOADING HTML SNIPPETS FROM THE SERVER In the previous sections, you’ve seen how ...
(^196) ❘ CHAPTER 7 AJAX class='folderTreeHasChildren' data-id='5198' alt='+' title='Click to expand.' /> System U ...
Loading HTML Snippets from the Server (^) ❘ 197 height: 28px; background: url('tree/internal.png') no-repeat left 1px; padding: ...
(^198) ❘ CHAPTER 7 AJAX $(this).next().toggle(); if ($(this).attr('src').indexOf('down') != -1) { arrow = 'tree/right.png'; } $( ...
Loading HTML Snippets from the Server (^) ❘ 199 .next(). this references the element, and next() causes the next sibling elemen ...
(^200) ❘ CHAPTER 7 AJAX After the request is made, the following callback function is executed: function() { $(this) .show() .pr ...
Dynamically Loading JavaScript (^) ❘ 201 Whatever use you fi nd for this functionality, in this section, I walk you through the ...
(^202) ❘ CHAPTER 7 AJAX 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...
Dynamically Loading JavaScript (^) ❘ 203 user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: ...
(^204) ❘ CHAPTER 7 AJAX { $(this).animate({ 'background-color' : 'rgb(255, 255, 255)' }, 1000 ); } } ); } ); } ); The JavaScript ...
AJAX Events (^) ❘ 205 The script that you load for the example, jQueryUI.js, along with the source code for the example, is avai ...
(^206) ❘ CHAPTER 7 AJAX title='/Applications'> Applications Library System Users [http://www.it-eb ...
AJAX Events (^) ❘ 207 Then, some CSS is added to the example to put the activity indicator in the lower-right part of t ...
(^208) ❘ CHAPTER 7 AJAX display: none; } Then fi nally, the JavaScript is modifi ed so that the activity indicator is dynamicall ...
AJAX Events (^) ❘ 209 } $(this).attr('src', arrow); } } ); } ); This modifi cation looks like what you see in Figure 7-6, when y ...
(^210) ❘ CHAPTER 7 AJAX Using AJAX Event Methods The preceding example defi nes events globally using the $.ajaxSetup() method. ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf