Posts

Showing posts from May, 2020

How to add jQuery, a JavaScript Library

Image
# Introduction jQuery is a lightweight, JavaScript Library which enables us to use JavaScript in a much easier way. jQuery takes many lines of JavaScript code and wraps them into methods that can be called using a single line of code . It thus makes it a lot simpler to do a lot of common tasks that requires many lines of JavaScript code. Note: There are many JavaScript libraries out there but jQuery is probably the most popular and the most extendable one ( jQuery has plugins for almost any task out there and handles cross-browser issues very well ). # Adding jQuery There are 2-ways to add/use jQuery on a website or blog: Download the jQuery library and self-host it. Include jQuery library from a CDN . # Downloading jQuery library and self-hosting it The jQuery library can be downloaded from its official website jQuery.com 🔗 . It is a single JavaScript file, which is referenced/included with the HTML <script> tag ( <script> tag should be in...