Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 1: Creating JavaScript objects CHAPTER 6 279 Vehicle.prototype.getInfo = function () { return this.year + ' ' + this.make ...
280 CHAPTER 6 Essential JavaScript and jQuery which accepts a parameter for the this object, and parameters for the parameters o ...
Lesson 1: Creating JavaScript objects CHAPTER 6 281 This completes Car, and Boat is similar except that Boat has a propellerBlad ...
282 CHAPTER 6 Essential JavaScript and jQuery var actual = c.startEngine(); var expected = 'Vroom'; equal(actual, expected, 'Exp ...
Lesson 1: Creating JavaScript objects CHAPTER 6 283 FIGURE 6-8 he passing inheritance testsT Lesson summary ■■A class is a bluep ...
284 CHAPTER 6 Essential JavaScript and jQuery ■■JavaScript is a prototype-based, object-oriented programming language. A prototy ...
Lesson 2: Working with jQuery CHAPTER 6 285 Lesson 2: Working with jQuery This lesson introduces jQuery, which is very well docu ...
286 CHAPTER 6 Essential JavaScript and jQuery ■■Forms Methods that provide functionality when working with form controls ■■Offse ...
Lesson 2: Working with jQuery CHAPTER 6 287 After locating jQuery, click the Install button. The installation will start and, in ...
288 CHAPTER 6 Essential JavaScript and jQuery <h1 id="qunit-header">QUnit example</h1> <h2 id="qunit-banner">& ...
Lesson 2: Working with jQuery CHAPTER 6 289 You can use either of these names to access the library features, so in the interest ...
290 CHAPTER 6 Essential JavaScript and jQuery In Figure 6-11, notice there is an array element (shown as [0]), and the length pr ...
Lesson 2: Working with jQuery CHAPTER 6 291 browser–compatible features that jQuery has. If you need to reference the DOM object ...
292 CHAPTER 6 Essential JavaScript and jQuery All the IntelliSense suggestions have a yellow warning triangle, and a message is ...
Lesson 2: Working with jQuery CHAPTER 6 293 txtResult = $('#txtResult'); clear(); } function clear() { txtInput.val('0'); txtRes ...
294 CHAPTER 6 Essential JavaScript and jQuery txtInput, so proper IntelliSense can be provided. To take advantage of IntelliSens ...
Lesson 2: Working with jQuery CHAPTER 6 295 this object, the jQuery text method retrieves the inner text of the element and assi ...
296 CHAPTER 6 Essential JavaScript and jQuery It’s best to place this at the bottom of your HTML document and call an initialize ...
Practice exercises CHAPTER 6 297 You are interested in locating all elements on your webpage, so your statement is var paragra ...
298 CHAPTER 6 Essential JavaScript and jQuery Your code should look like the following. /// <reference path="_references.js" ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf