Learnt out the Web Development for a Project | jQuery
01 Oct 2017-
jQuery is the most popular tool of JavaScript of all time.
-
<script>function()</script>
is written above the HTML code andfunction()
is included into the script tag. -
The code which is written inside
function()
is loaded as soon as we load the page. -
$(document).ready(function() {your code});
is the Syntax for DOCUMENT READY FUNCTION. -
All jQuery functions start with
$
which is called Signed dollar operator or bling. -
To make something responsive, say Button needs to be bounced when the page is loaded then we write
$("Button").addClass("animate bounce");
inside the DOCUMENT READY FUNCTION. -
To make something responsive, say Column needs to be shaked and animated then we call div class of that particular element inside our function.
-
Classes are called by . and Ids are called by # or directly by type.
-
A Class can also be removed using
removeClass
. -
The CSS of an HTML element can also be changed using
css()
function, Be it color, font etc. -
jQuery has a function called
prop()
which changes the property of non-CSS things from the elements. -
jQuery has
text()
to alter the text of an element andhtml()
for adding tags to elements. -
.remove()
helps in removing the complete HTML element. -
appendTo()
is used to move the elements from onediv
to anotherdiv
. -
clone().appendTo()
is used to clone/copy the element from onediv
to anotherdiv
. -
parent()
function is used to access elements using parents andchildren()
is vice-versa.