JQuery Intro


JQuery:- This is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.

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
Many of the biggest companies on the Web use jQuery, such as:
  • Google
  • Microsoft
  • IBM
  • Netflix
Adding JQuery in Our Project:- There are several ways to start using jQuery on your project. You can:
  • Download the jQuery library from jQuery.com
  • Include jQuery from a CDN, like Google.
You download the Jquery file from jQuery.com.
<head>
   <script src="jquery-3.2.1.min.js"></script>
</head>
If you not download jquery from offical site so you can use like this

Google CDN:-
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" ></script>
</head>
Microsoft CDN:-
<head>
   <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
</head>
Syntax Of JQuery:- The jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s). 
Basic syntax is: $(selector).action() A $ sign to define/access jQuery. A (selector) to "query (or find)" HTML elements. A jQueryaction() to be performed on the element(s).

Syntax :- $(selector).action();

Jquery Methods:-
$(document).ready(function(){

// jQuery methods go here...
});
Or shorter method
$(function(){

   // jQuery methods go here...
});

Thanks!


Post a Comment

0 Comments