filmov
tv
#1 jQuery Basics | Introduction to jQuery | Why jQuery better than JavaScript?
Показать описание
Before we start working on jQuery, we should have a basic knowledge of:
HTML
CSS
JavaScript
jQuery is a fast, lightweight and feature-rich JavaScript library that simplifies JavaScript programming.
The purpose of jQuery is to make it much easier to use JavaScript on your website.
In JavaScript, we used to write all functions of our own that requires many lines of code. There is no pre-defined functions in JavaScript but in jQuery, we got pre-defined functions like hide, show that we can use anywhere to serve our purpose.
The main advantage of JQuery over JavaScript is the ease with which we can use JQuery. It is a lot more easy to use than standard JavaScript libraries and some other JavaScript libraries with JQuery.
Ways of adding jQuery to your web pages :-
1) Directly include jQuery from external CDN Path like Google
There are two versions of jQuery available for downloading:
Production version - this is for your live website because it has been minified and compressed
Development version - this is for testing and development (uncompressed and readable code)
jQuery is much better than JavaScript due to following reasons :-
1) Write less, Do more :- jQuery is "Write less, Do more" JavaScript library in which one need to write less code that will do more. We will get pre-defined functions in jQuery that already build in JavaScript.
2) Simplifies :- With JavaScript, one needs to write their own scripting which is time-consuming. With JQuery, one need not write much as scripting already exists.
3) Handle Ajax Calls :- jQuery also easily handles complex tasks like Ajax calls that we often use with PHP frameworks like Laravel.
4) Browser Independent :- With JavaScript, one needs to handle multiple- browser compatibilities by writing their own code. With JQuery, as we all know that it is a multi-browser library.
5) Fast :- JQuery is fast with modern browsers and modern computers. Suited for complex operations where developer are prone to mistakes.
6) Lightweight :- JQuery is a lightweight as compared to other JavaScript libraries.
Where to Write :-
JavaScript code we used to write inside script tags within an HTML. We are not required to import/add any libraries to run JavaScript code.
JQuery code also have to be inserted inside script tags inside HTML but we have to insert/import the JQuery libraries.
Syntax :-
There are no special symbols like JQuery to define JavaScript. We can simply start writing JavaScript code within the script tag in HTML as described earlier.
jQuery is defined with $ sign like below :-
$(selector).action()
where $ – a sign to define JQuery
selector – query to find HTML elements
action – JQuery action to be performed
In next video, we will learn basic jQuery Selectors.
Thanks for watching :)
Join this channel to get access to perks:
HTML
CSS
JavaScript
jQuery is a fast, lightweight and feature-rich JavaScript library that simplifies JavaScript programming.
The purpose of jQuery is to make it much easier to use JavaScript on your website.
In JavaScript, we used to write all functions of our own that requires many lines of code. There is no pre-defined functions in JavaScript but in jQuery, we got pre-defined functions like hide, show that we can use anywhere to serve our purpose.
The main advantage of JQuery over JavaScript is the ease with which we can use JQuery. It is a lot more easy to use than standard JavaScript libraries and some other JavaScript libraries with JQuery.
Ways of adding jQuery to your web pages :-
1) Directly include jQuery from external CDN Path like Google
There are two versions of jQuery available for downloading:
Production version - this is for your live website because it has been minified and compressed
Development version - this is for testing and development (uncompressed and readable code)
jQuery is much better than JavaScript due to following reasons :-
1) Write less, Do more :- jQuery is "Write less, Do more" JavaScript library in which one need to write less code that will do more. We will get pre-defined functions in jQuery that already build in JavaScript.
2) Simplifies :- With JavaScript, one needs to write their own scripting which is time-consuming. With JQuery, one need not write much as scripting already exists.
3) Handle Ajax Calls :- jQuery also easily handles complex tasks like Ajax calls that we often use with PHP frameworks like Laravel.
4) Browser Independent :- With JavaScript, one needs to handle multiple- browser compatibilities by writing their own code. With JQuery, as we all know that it is a multi-browser library.
5) Fast :- JQuery is fast with modern browsers and modern computers. Suited for complex operations where developer are prone to mistakes.
6) Lightweight :- JQuery is a lightweight as compared to other JavaScript libraries.
Where to Write :-
JavaScript code we used to write inside script tags within an HTML. We are not required to import/add any libraries to run JavaScript code.
JQuery code also have to be inserted inside script tags inside HTML but we have to insert/import the JQuery libraries.
Syntax :-
There are no special symbols like JQuery to define JavaScript. We can simply start writing JavaScript code within the script tag in HTML as described earlier.
jQuery is defined with $ sign like below :-
$(selector).action()
where $ – a sign to define JQuery
selector – query to find HTML elements
action – JQuery action to be performed
In next video, we will learn basic jQuery Selectors.
Thanks for watching :)
Join this channel to get access to perks:
Комментарии