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?
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 :
but there is no guarantee as jQuery could be inlined in another script or loaded dynamically.