Getting started with jQuery

What is jQuery?

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

Many of the new users think of jQuery as a new different technology. Instead it’s simply a Javascript ‘library’, which simplifies the client side web development like HTML5. Due to simplification and easy to use jQuery has been adopted on the mass level in both websites and web apps. jQuery was created by John Resig, since this is an open source project, a lot of other talented developers have jumped in to contribute to it. You can learn more on the jQuery.com

Now let’s begin with our first and simplest code of jQuery.

<html>
<head>
<title>jQuery Hello World</title>

<!-- include jquery library -->
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>

</head>

<body>

<!-- our jQuery script -->
<script type="text/javascript">

$(document).ready(function(){
 $("#myid").html("This is Hello World by JQuery");
});

</script>

This is Hello World by HTML

<!-- the element targeted by our above script -->
<div id="myid">
</div>
</body>
</html>

Note. you can either download the jQuery library yourself, host it and include in your script, However you can use Google hosted jquery too.

CDN HOSTED JQUERY

A number of large enterprises provide hosted copies of jQuery on existing CDN networks that are available for public use. Below are links to the CDN-hosted copies of jQuery that you may hotlink to.

 



Hello my name is Imran Jafri, I am the Editor and founder of Maboot Mag. I am extremely passionate about Web design, UX and GUI. I love to play with PHP, javascript and Wordpress. Of course I am a MAC and using Ubuntu as my secondary OS. That's all.

Share This Post

Leave a Reply

© 2017 Maboot.com. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie