jQuery Introduction and it’s Uses

1

Hello friends!

My name is Naresh Pal and this write up is all about the fundamentals of jQuery and I am glad to share my experience and knowledge with you. I am learning it in ADMEC Multimedia Institute, Delhi and I was asked to explain what I learned in my class so I am writing here.

jQuery is the milestone for the beginners. It is simple and easy to learn. jQuery is good to add front-end-interactivity to web page. It reduces the large codes of JavaScript seamlessly.

2

Mr. John Resig is an American software engineer and entrepreneur, best known as the creator and lead developer of the jQuery a JavaScript library and its released by jQuery team in August 26, 2006. jQuery is free, open-source software licensed under the MIT License. 

What is jQuey?

jQuery is light weight JavaScript library. Where we write less and do more. The purpose of using jQuery is to make JavaScript code easy. jQuey have a lot of common tasks for a web page in a single line of code, which required many lines if working in JavaScript. We can say that jQuery has the ability to wrap JavaScript multi line code into a single line code.

jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.

It is a inbuilt library for JavaScript. So we have to need just basic knowledge of JavaScript (Core & Advanced) like Operators, Conditions, Loops, Objects, function, Array etc. and we can have good command in jQuery then easily.

Why we use jQuey?

When we want to develop a dynamic website, we have a need of at least these three primary tools to build it i.e. HTML, CSS and JavaScript.

We can create data structure and presentation using HTML5 and CSS3, but if we want to add some logic’s or behaviors to our web page for good front end interactivity, we will accomplish such tasks using JavaScript.

When we code a program in JavaScript to perform a simple event to our web page. We have to write many lines of code for very small task after having a good command over JavaScript Core and Advanced. Large code takes more development time and diminish the performance of application or website. Writing in plan JavaScript involves various cross browser issues too and seriously that sucks badly.

jQuery is a complete solution for this. jQuery is the library of JavaScript means developers of jQuery simplify the JavaScript code. The purpose of jQuery is to make JavaScript code as much easier as it can be with all the cross browser solutions so jQuery purpose is “write less, do more”.

How to use jQuey?

We just have to follow some steps as given below:

STEP 1 : First we have to download jQuery file from www.jquey.com we have to keep this file in our root folder.

STEP 2 : At the end of body section of HTML page start the script tag and place the source of jquey.js file as follows;

<html>
<head>
<title> ………..</title>
</head>

 <body>
<! – Write your HTML code here –>
http://(path)/jQuery.js

// your Query goes here

</body>
</html>

Getting Started with jQuery

jQuery or $

Both of them are same so you can use alternatively. $ is mostly used for ‘jQuery’ because it is short and fast to write.

Note: Don’t use $ if it is conflicting with some other libraries being used in same app.

Example: Say “hello world”

$(document).ready(function(){

alert(‘Hi ! here I am getting start with jQuery’);

}

Result :

3

Advertisements
This entry was posted in jQuery and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s