+91 90691 39140 | +1 253 214 3115 | info@hub4tech.com | hub4tech

JQuery Tutorial



jQuery is a small and lightweight JavaScript Library developed by John Resig in 2006. The objective of JQuery is Write Less, Do More".

jQuery is a very easy to learn and simplifies the JavaScript programming.

The core fetures are listed below:
  • Light Weight Library Files
  • Support Cross Platform / Browser
  • DOM Manipulation
  • Event Handling
  • Support AJAX
  • Predefined Animations
  • Support CSS3 and XPath

jQuery Syntax


Basic syntax of jQuery is:

$(selector).action()
  • A $ sign to define / access jQuery
  • A ( selector ) to "query ( or find )" HTML elements
  • A jQuery action() to be performed on the element(s)

Example:

$("h1").hide() - It will hide all < h1 > elements.

The Document Ready Event


It is good practice to wait for the document to be fully loaded and ready before working with it. So this event helps to prevent code run till the document not loaded fully.

Below is the syntax:

	$( document ).ready( function ( ) 
	{
		// do stuff when DOM is ready
	});


Check the below example for more help

	$( document ).ready( function ( )
	{
		$("p").click( function ( )
		{
			$( this ).hide( );
		} );
	} );


Is it Helpful?
Copyright ©2015 Hub4Tech.com, All Rights Reserved. Hub4Tech™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.
FOLLOW US