A Complete guidance with understandable examples
ImamHussain – (4 years of experience in Web Development )
, jQuery
1: How to Get Started With jQuery | Learn jQuery
Introduction to jQuery
In this section, we will discuss what jQuery is and why it is
beneficial to learn when building a website. jQuery is not
technically a programming language but a JavaScript framework
that simplifies the use of JavaScript in a website. It allows for
people to write JavaScript in a much simpler and easier way,
making it a great place to start for beginners.
Most people who learn JavaScript today are using jQuery because
it makes the process easier and is a powerful framework for
creating websites using JavaScript. The basic concept of jQuery is
that it allows you to do more with JavaScript while writing less
code.
Before you start learning jQuery, it is recommended that you learn
HTML and CSS first since jQuery uses HTML and CSS in its code.
Some people suggest learning JavaScript first as it is a good way to
learn the fundamentals of jQuery. However, it is not necessary as
jQuery is technically JavaScript, and you can mix JavaScript into
your jQuery code.
jQuery allows for changing the behavior of a website when users
interact with it or when a certain amount of time has passed. For
example, if a website has a banner that slides after a few seconds
of entering the site, the sliding effect is done using jQuery or
JavaScript.
Example of jQuery Code
Below is an example of a piece of jQuery code that does the same
thing as JavaScript code:
$('#myDiv').hide();
This code hides the element with the ID "myDiv". In JavaScript, the
code would look like this:
document.getElementById("myDiv").style.display = "none";
As you can see, jQuery makes it easier to write JavaScript code.
Installing jQuery
In the next episode, we will discuss how to install jQuery. We need
to get the jQuery code from somewhere, whether it is from online