Web Development with jQuery®

(Elliott) #1

Chapter 10 (^) ❘ 487
bapp01.indd 02/18/2015 Page 487
dataType : 'json',
data : JSON.stringify({
dataForTheServerHere : true
}),
success : function(json, status, request)
{
},
error : function(request, status)
{
}
});
CHAPTER 8



  1. An integer value in milliseconds or the strings 'slow', 'normal', or 'fast'.

  2. It animates an element’s height property when displaying an element.

  3. The fadeIn(), fadeOut(), and fadeToggle() methods all animate an element’s opacity to dis-
    play or hide an element.

  4. The animate() method.

  5. The linear and swing easings are included in jQuery core.


CHAPTER 9



  1. $.fn.extend() or $.fn.prototype.

  2. console.log($.fn); Then examine the object in Firefox or Chrome.

  3. Defi ne my functions or objects inside the closure used to defi ne my plugin.

  4. They are defi ned in the keyword this.

  5. It should attempt to return this (the selection in context), or jQuery, if possible.

  6. It allows me to remove my own events explicitly, without touching other people’s or other
    projects’ events.

  7. Answers may vary but include any valid code that meets the specifi ed criteria.


CHAPTER 10



  1. scrollTop() and scrollLeft().

  2. The top (or offset top) of the wanted element, the top (or offset top) of its container, and the
    current vertical scrollbar position (or scrollTop).

  3. Any syntactically correct code implementing something similar to the following:


http://www.it-ebooks.info

Free download pdf