Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

Answers CHAPTER 6 309



  1. Correct answer: A
    A. Correct: Using jQuery will help you create event-driven, browser-independent
    code.
    B. Incorrect: The code for creating and subscribing to events is browser-specific.
    C. Incorrect: You need to use JavaScript to write event-driven code.
    D. Incorrect: Use the jQuery library to write browser-independent code.

  2. Correct answer: C
    A. Incorrect: jQuery does not have an exists property.
    B. Incorrect: Even if no elements are found, jQuery will return a wrapper object.
    C. Correct: If no elements are found, the length property will be 0, which converts to
    a Boolean false.
    D. Incorrect: jQuery does not have a count property.

Free download pdf