JQuery Interview Questions Part - 1
Q 1. What is JQuery?
Ans 1. JQuery is a Javascript library. The main aim of using JQuery is to write less code and do more. JQuery is a concise Javascript library. It helps in HTML document traversing, event handling, animating and ajax interactions for rapid web development.It is easy to use and cross-platform.
Q 2. How to access JQuery library?
Ans 2. There are two ways you can access JQuery Library -
1. Download from jquery.com
2. Include JQuery from a CDN (Content Delivery Network)
If you want to download, you can either download an uncompressed or minimized version of JQuery library. The uncompressed version is often used in development environment and minimized(compressed) version is used in production environments as it is light.
If you want to download, you can either download an uncompressed or minimized version of JQuery library. The uncompressed version is often used in development environment and minimized(compressed) version is used in production environments as it is light.
Q 3. How to include JQuery library on your HTML page after downloading it?
Ans 3. After downloading the JQuery library, place it in the same directory as your HTML file. Then, specify the name of the JQuery library in the "src" attribute of the script tag.
For example -
<script src="jquery-3.1.1.min.js">
</script>
Q 4. What is CDN?
Ans 4. CDN is an acronym for Content Delivery Network. It is a system of computers that exist all over the world and cache files for users to access.
Q 5. Why including JQuery library from CDN is preferred over downloading it?
Ans 5. Using CDN boosts performance. CDN servers are setup all over the world. So, when a user visits your site, the JQuery library is downloaded from the nearest CDN server. The main advantage of CDN is that if a user has already visited a site that uses CDN, it will be cached. So, next time when the same user visits your site, JQuery library will be used from cach rather than downloading it from CDN.
Q 6. How to include JQuery library on your HTML page from CDN?
Ans 6. CDN service is provided by many companies, but some popular ones are - Google and Microsoft.
To include JQuery library from Google CDN, specify the URL to it in the "src" attribute of the "script" tag as shown below -
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">
</script>
To include JQuery library from Microsoft CDN, specify the URL to it in the "src" attribute of the "script" tag as shown below -
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js">
</script>
Q 7. What is the latest version of JQuery available?
Ans 7. The latest version of JQuery is - 3.1.1
Q 8. Which provides better performance JQuery or Javascript?
Ans 8. Javascript is faster than JQuery as JQuery is a library of Javascript only. So, using javascript directly rather than using it through JQuery provides better peformance. We use JQuery just for ease of use and to get the same task done with lesser code.
Q 9. Is JQuery an open source library?
Ans 9. Yes, JQuery is a free and open source licensed under the MIT license. Open-source software (OSS) is computer software with its source code made available with a license in which the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose.
Q 10. What is the basic syntax of JQuery?
Ans 10. Below is the basic syntax of JQuery -
Basic Syntax - $(selector).action()
$ - It represents JQuery library
Selector - used to select an HTML element
action - used to perform an action on a selected HTML element
nice one. thanks
ReplyDeleteThanks
Deleteyurtdışı kargo
ReplyDeleteuc satın al
minecraft premium
nft nasıl alınır
en son çıkan perde modelleri
özel ambulans
en son çıkan perde modelleri
lisans satın al