Beruflich Dokumente
Kultur Dokumente
com/jquery/jquery-selector
Jquery Tutorials
jQuery is a JavaScript Library. It is simple and easy to learn. It is also lightweight, "write less,
do more". The main purpose of jquery to make javascript easier.
History of Jquery
Jquery is created by John Resig in 2006 with a nice motto - Write less, do more.
Prerequisites
Before learning jquery language you must be knowledge of Html, css and javascript. If you
have no good knowledge of javascript must read our javascript tutorial.
Introduction
Jquery is the library of JavaScript. It is simple and easy to learn. For perform any task jQuery
required less code compare to javascript. For learning jquery's you need good knowledge of
Html, css and javascript.
Jquery is created by John Resig in 2006 with a nice motto - Write less, do more.
Microsoft
IBM
Jquery Feature
Jquery is the Library of JavaScript. It is simple and easy to learn. For perform any task Jquery
required less code compare to javascript.
Lightweight
CSS manipulation
Html manipulation
Event handling
JavaScript Library
Ajax Support
Built-in Animation
Simple and easy: It have predefined method using you can perform any task
easily compare to JavaScript. And it is easy to learn.
CSS manipulation: It have predefined css() method for manipulate style for
any Html elements.
Ajax Support: It support ajax, you can develop a responsive and feature-rich
site using AJAX technology.
Add Jquery
There are several ways to add jQuery on your web-page. You can download jquery from
jquery.com or Include jQuery from a CDN. Blow two method are used for add jQuery;
Downloading jquery
In this method you download jquery library and host on your website. Jquery library is a single
JavaScript file, you need to give path of jquery file on your website;
Add jquery on web-page
<head>
<script src="jquery-1.11.3.min.js"></script>
</head>
jQuery CDN
Another way to add jquery on your web-page is; direct use hosted jquery library files, both
Google and Microsoft host jQuery library. Below syntax is used for add jquery library on your
website;
Google CDN
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
Microsoft CDN
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min.js"></script>
</head>
website load faster. So use google or Microsoft hosted files is better than host jQuery file on
your own website.
What is a CDN?
A content delivery network or content distribution network (CDN) is a large distributed system
of servers deployed in multiple data centers across the Internet.
Only for remember: Here lot of files are stored, using CDN you can directly use these files
on your website. No need to upload these files on your server.
It saves bandwidth.
When any user visit on other website it save in browser, as a result next time
easily load.
Jquery Syntax
With the help of jQuery you can select Html elements and perform actions on them.
Syntax
$(selector).action()
Example
$(document).ready(function(){
});
jQuery(document).ready(function(){
});
Syntax
$(document).ready(function()
{
// jQuery methods
});