I have good understanding how javascript as well as jQuery can be used in the HTML file but logically one question is arisen.
When we want to embed javascript into HTML file, generally (not every time) we write this simple code in head part.
<script type="text/javascript"> ... </script>
And when we want to embed jQuery at that time the same peace of code
<script type="text/javascript"> ... </script>
How can we identify by seeing this line only, is it js code or jQuery code?
Can anyone brief me about this logic?
The purpose of jQuery is to make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.
jQuery is a JavaScript library created to make it easier and simpler to write JavaScript and HTML. It works on most web browsers and was invented by John Resig. The first release was in January 2006 at BarCamp NYC.
jQuery promotes simplicity With simple syntax and open coding standards, developers can shorten the time it takes to deploy an application or site.
jQuery promotes simplicity: jQuery is easy to learn. It has simple code syntax. Developers can easily implement functionalities with jquery. Developers don't have to be experts in programming to start working in jQuery.
jQuery is just a Javascript script providing you, when you execute it before your own scripts, a few very useful functions.
When you're coding in jQuery, you're coding in Javascript.
This means of course that everything you do using jQuery could be done (sometimes with pain, especially if you're not experimented) in Vanilla Javascript.
Usually, you'll detect that a page is using the jQuery library by such an import in the head of the page :
<script type="text/javascript" src="jquery-ui-1.8.21.custom.min.js"></script>
but there is no guarantee as jQuery could be inlined in another script or loaded dynamically.
jQuery is javascript
jQuery is simply a javascript library allowing you to carry out actions which require less code (because the jQuery code does the extra javascript work for you).
jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML
Source: Wikipedia
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With