Wednesday, 10 July 2013

beginning of Jquery "Advanced Javascript The new journey towards client scripting"


            I am writing this by keeping in mind that this is your first step toward the Jquery,and with the believe that you are aware of the javascript (client side scripting) syntax , jquery is the advanced javascript library. 

Let us know how we can use the jquery.

      All browser support javascript but for jquery to work in any browser you need to create the working environment by giving the CDN(Content delivery network) link as follows else jquery will be foreign language for browsers.

<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js " ></a>

     The above link will refer to the Jquery library , Now the environment is ready to work with Jquery and the magic of jquery began. As its client side scripting Jquery will be of no sense until all serverside loading completes and the body of the webpage loads in to the browser. So to confirm whether document of the webpage is ready to use..

The first and most beginning step of jquery is to check if the document is ready(web page loaded). 

<script>
$(document).ready(function() { 
// all jQuery code goes here
 });
</script> 

   The above Jquery function will check if document of the page is ready to use, then we can use Jquery now to check put alert('Hello world'); in that .ready function with this alert popup which confirms that the environment is ready to use Jquery.
<script>
$(document).ready(function() { 
alert('Hello world');
 }); 
</script>

No comments:

Post a Comment