home

Jquery Introduction

jquery basics for beginners and web Ui developersJquery is a fast simple lightweight javascript library (write less do more), and it simplifies javascript and easy to learn. before you start to studying about the jquery you should have some basic knowledge in html, css, because it will make more attractive the web page.

Browser Compatibility and Installation

Everything is fine to start, in the browser, you should enable the javaScript if it is already enabled then fine. jquery starts with $ assign followed by parentheses () in the parentheses you put the document and use dot (.) write type ready and put the parentheses and ends with semicolon, this semicolon techs the end of the statement, each statement in the javascript needs to end with semicolon and inside parentheses type the function followed by parentheses and space put the curly braces {}all of the code and function going to be inside curly braces. while reading this simultaneously, you can see the below example code then only you will understand the things.

$(document).ready(function(){
write your code here
)};

Why jquery is most popular framework

Javascript have a lot of frameworks, but jquery seems to be most popular and extendable framework and we can manage everything with simple code, thats why many of the top biggest companies are using wikipedia, google, Microsoft, and IBM etc...

JQuery Getting Started

How to use jquery in the webpage

there are two ways to install jquery library in your webpage.

Where to include jquery library link?

The jQuery library file should be inside the <head> section, see the below example code.

<head>
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
(or)
<head>
<script src="js/jquery-1.10.2.min.js"></script>
</head>

How many possibilities are there to write jquery in web page

There several (Three)ways to include jquery in the web page

1. Writing script inside the header

Most of the people use to write jquery code in web page inside the head of the page.

<head>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
</script>
</head>

2. Writing script inside any where in the web page

write jquery script any where in the page like inside of the header or inside of the body or external this method is recommend to use, if you want to apply for particular element that time you can use this method.

In this example we have written the code in aside tag
<header> Page Header part<header>
<nav>Page Main Menu</nav>
<aside>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
</script>
</aside>

3. Writing code in external Js file

It's a most common and very useful method use to write if the code is heavy(lengthy) and insert individual modules code in a single file that time it will be the useful method.

$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});

Jquery Document Structure

Jquery has some basic document structure check the picture differently you will understand some basics like how to start and where to write if you want to write code inside of the file you should mention jquery script type <script></script>.

Why do use jquery

Here some are the reasons why do people really prefer jquery.