//każda funkcja zwraca obiekt jQuery, więc kolejne
//funkcje mogą operować na nim dalej
$("#div1").find("span").text("nowy tekst")
.css("background","blue").hide("slow");
$("div").find("span").eq(0).click(function(){
$(this).parent().find("div").empty();
});