0% found this document useful (0 votes)
13 views2 pages

Lecture 1

Uploaded by

moinuddeen.1999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Lecture 1

Uploaded by

moinuddeen.1999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Lecture 1<Introduction to Jquery> Prepared by Mr. Noman Tanseer (N o m a n s h 3 9 @ g m a i l .

c o m )
Introduction to jQuery
LECTURE (1)
What is the purpose of jQuery?
The purpose of jQuery is to make it much easier to use JavaScript on your website and it used to add dynamic
content on your webpage.
What You Should Already Know?
Before you start studying jQuery, you should have a basic knowledge of:
➢ HTML
➢ CSS
➢ JavaScript
What is jQuery?
JQuery is a lightweight, "write less, do more", and JavaScript library.

The purpose of jQuery is to make it much easier to use JavaScript on your website.

JQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them
into methods that you can call with a single line of code.

JQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.

The jQuery library contains the following features:

➢ HTML/DOM manipulation
➢ CSS manipulation
➢ HTML event methods
➢ Effects and animations
➢ AJAX
➢ Utilities

What is jQuery syntax?

Basic syntax 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).

Note: - Jquery is a case sensitive language.

1 | P a g e If you have any query joint the facebook group also for help and online lectures and tutorials.
https://www.facebook.com/groups/pofwccteachersofficial
Lecture 1<Introduction to Jquery> Prepared by Mr. Noman Tanseer (N o m a n s h 3 9 @ g m a i l . c o m )
How we can comment in jQuery?

………….For multiline comment………….


/*
This is
a multiline comment.
*/
………….For single line comment………….
// This is a single line comment...
What is Document ready event?

$(document).ready(function(){

// jQuery methods go here...

});

This is to prevent any jQuery code from running before the document is finished loading (is ready).
It is good practice to wait for the document to be fully loaded and ready before working with it. This
also allows you to have your JavaScript code before the body of your document, in the head section.
Here are some examples of actions that can fail if methods are run before the document is fully loaded:
• Trying to hide an element that is not created yet.
• Trying to get the size of an image that is not loaded yet.

How to link jQuery file with html page?

<script src="filename.js"></script>

First Program……..

<!DOCTYPE html>
<html>
<head>
<title>My first Program</title>
<script src="jquery-1.9.1.min.js"></script>
<script type="text/Javascript">
$(document).ready(function(){
alert('jQuery linked successfully');
});
</script>
</head>
<body>

</body>
</html>

2 | P a g e If you have any query joint the facebook group also for help and online lectures and tutorials.
https://www.facebook.com/groups/pofwccteachersofficial

You might also like