Jquery selection - sinsunsan/archiref_wiki GitHub Wiki

  • Select several DOM element that are not of the same type
    This code select html but also body
    $('html, body');

  • eq Return a given sub object by its index n°
    http://api.jquery.com/eq/

$('li').eq(2); // The third li
var previous = $(this).prev('td');   
var next = $(this).next('td');   
var all = $.merge(previous, next);