$( elements ) jQuery Demo

First paragraph.

Second paragraph.

Run Demo

		
function Demo(){
		
	// Get a jQuery stack containing the body tag.
	var jBody = $( document.body );
	
	// Alert side of stack (number of elements).
	alert( jBody.size() );
	
	
	// Get a jQuery stack containing all P tags.
	var jP = $( document.getElementsByTagName( "p" ) );
	
	// Alert side of stack (number of elements).
	alert( jP.size() );
	
}