- SPLessons

JQuery Tutorial for Beginners – L...

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

JQuery Tutorial for Beginners – Lesson

JQuery Tutorial for Beginners – Lesson 

Description :

Do you know JQuery? If you don’t know and you’re new to JQuery, if you want to learn jQuery it is very simple and easy to learn. First you have to know about Javascript, here I will you little introduction about Javascript and JQuery.

What is Javascript?
Javascript is a programing language used to make web pages interactive. It runs on any browser (IE, safari, Mozilla and Chrome, etc.). No need of any additional software’s to run script.

What it will do?
JavaScript can manipulate the DOM ‘Document object model’ (change HTML contents).

What is JQuery?
JQuery is a more faster, simple and small Javascript library

What it will do?
JQuery is to make it much easier to use JavaScript on your website. It fetch the DOM object in simple way.

Step :

Below I am giving very basic example of Javascript and Jquery how to use. For JQuery you must and should include Jquery library in your script. For Jquery library use download link above.

Create a html file named ‘index.html’ and below code in that page.


<script type="text/javascript" src="js/jquery-1.10.2.js" ></script>
<script type="text/javascript" >

<!--Javascript-->
function CallmyFunction() {

var Name=document.getElementById("txtName").value;
alert(Name);
}

<!--Jquery-->
// for this you must include Jquery library in your project.
$(document).ready(function() {

	var Name=$("#txtName").val();
    alert(Name);
});

<!--(or)-->

$(function () {

	var Name=$("#txtName").val();
    alert(Name);
});

</script>

Add below content in page body


Name : <input type="text" id="txtName"  value="Madhu"  />

In the above we have just added one textbox with id ‘txtName’, and in script we are fetching the value of textbox
using both javascript and jquery.

JQuery is very simple and easy to understand, in this article you just learned how to use jquery.
In next tutorial you will learn about ‘selectors’ and ‘filters’ in Jquery.

Thank you for reading article.