Web Development with jQuery®

(Elliott) #1

Chapter 6 (^) ❘ 485
bapp01.indd 02/18/2015 Page 485



  1. remove()

  2. clone(true)


CHAPTER 5



  1. It might look like this:
    $(nodes).each(
    function() {
    }
    );


$.each(
nodes,
function() {
}
);


  1. return false;

  2. The items referenced by the selector are kept in the selection; items not referenced by the
    selector are discarded.

  3. Keeps the current item in the selection; returning false removes the current item from the
    selection.

  4. A value that evaluates to true. Returning false will remove an item from the array.

  5. It replaces the value of the item passed to the callback function during that iteration.

  6. –1 means that the value does not exist within the array; a return value of zero or greater
    means that the value exists within the array.


CHAPTER 6



  1. $('div').css('color');

  2. Specifying any color in the second argument, the code would look something like this:
    $('body').css('backgroundColor', 'yellow');




$('div').css({
padding: '5px',
margin: '5px',
border: '1px solid grey'
});


  1. outerWidth()

  2. outerHeight(true)


http://www.it-ebooks.info

Free download pdf