Więcej funkcji w jQuery

//is: czy dany element jest...
$( "ul" ).click(function( event ) {
  var target = $( event.target );
  if ( target.is( "li" ) ) {
    target.css( "background-color", "red" );
  }
});

//has: czy dany element ma...
var hasLinks = $("nav").has("a");

//index: ktore miejsce zajmuje element
var num = $(this).index("div");
var num2 = $("div").index( $(this) );