JQuery Syntax

JQuery is library of JavaScript and it more easy to use

The purpose of jquery team is write less do more

Before write the code of jquey you need to write jquery syntax

JQuery Syntax

<!------ If you write jquery in index.html file ----------->

<script>

$(document).ready(function(){ /* your code */ });

</script>

Note : Jquery code start  by $ sign 

Example

<DOCTYPE html>

<head>

<title> Jquery </title>

</head>

<body>

<p id="demo"> This is my first jquery code </p>

<script>

$(document).ready(function(){

var text  = $("#demo").html();

console.log(text);

});

</script>

</body>

</html>

Learn more in next chapter