Wednesday, 4 November 2020

JQuery Interview Questions And Answers For Experienced



JQuery Interview Questions And Answers For Experienced
jQuery is a fast, small, and rich-featured JavaScript library.

It makes things like HTML document traversal and manipulation, event handling, animation, Ajax and much simpler with an easy-to-use jQuery. Jquery works across a multiple of browsers. 

With a combination of versatility and extensible, jQuery has changed the way that millions of people write JavaScript. It help for Fast development.


Question: What is current stable version of jQuery?
Version: 3.4.1 (May 1, 2019)


Quesion: In Which language jQuery is written?
JavaScript


Question: What is offical website of jQuery?
https://jquery.com/


Question: Which file need to include to use jQuery functions.
We must include a jQuery file.
We can also include jQuery from their official website.
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>



Question: What are other jQuery Foundation Projects?
  • jQuery User Interface
  • jQuery Mobile
  • QUnit
  • Sizzle


Question: What is JQuery UI?
JQuery UI is a jQuery library where UI comes with cool widgets, effects and interaction mechanism. Whether you're building highly interactive web applications OR just need to add a date picker to a form control, jQuery UI is the perfect choice.


Question: From where I can get List of jQuery UI Demos?
http://jqueryui.com/demos/



Question: What are the different type of selectors in Jquery?
Following are 3 types of selectors in Jquery
  1. CSS Selector
  2. XPath Selector
  3. Custom Selector


Question: What is the difference between jQuery-x.x.x.js and jQuery.x.x.x-min.js?
In terms of functionality, there is no difference between the jQuery-x.x.x.js and jQuery-x.x.x-min.js. jQuery-x.x.x-min.js also called minified version because in this file there is no space, no tab, no newline, small variable name and very less file size. Minified version load more faster as compare to normal jquery, that's why minified version used in production environment. However this can play a vital role in th


Question: What is the use of Delegate() Method in jQuery?
1. Attach an parent event to each one of its child elements.
2. Attach the event to the elements which is not available at the time of page loading (element will after page load).



Question: What does .size() method of jquery?
Return the number of elements in node.
$("div.webtechnologyexpert").size();



Question: What is the use of jQuery Connect?
It is used to connect or bind a function to another function.It is use to execute a function whenever a function from another object is executed. To use this you need to download the jquer.connect.js file.
        $.connect('fun1',fun2) 
        $.connect(null,'fun1',fun2) 
        $.connect(self,'fun1',fun2) 
        $.connect('fun1',null,fun2)     



Question: What is the use of jQuery disconnect?
It is used to disconnect a function to another function.It is the opposite of $.connect



Question: What is the use of jQuery disconnectAll?
It is used to disconnect all the connected functions.


Question: What is the purpose of jquery-x.x.x-vsdoc.js?
Generally we will use jQuery-x.x.x-vsdoc.js to provide the intellisense support. We can even delete this file. But the thing is that it won't provide the intellisense support if we delete that file.


Question: How to hide and show a div?
$(document).ready(function(){
        $('div#mydiv').hide();
        $('div#mydiv').show();  
    });


Question: How to add data in empty div?
$(document).ready(function(){        
        $('div#mydiv').html();
});


Question: How to add click event on div in jQuery
    $(document).ready(function(){
        $("div#mydiv").click(function(){
            alert('mydiv is clicked')
        });
    });



Question: How to add double-click event on div in jQuery
    $(document).ready(function(){
        $("div#mydiv").dblclick(function(){
            alert('mydiv is double clicked')
        });
    });


Question: How to add hover event on div in jQuery?
    $(document).ready(function(){
        $("div#mydiv").hover(function(){
            alert('Hover on mydiv')
        });
    });    



Question: Is jQuery dependened on operating system?
No, jQuery is independent of any operating system. It works similar in all operating system.



Question: Explain the features of jQuery?
  1. Effects and animations on html
  2. Ajax to send the server call
  3. Extensibility
  4. Add/Change on DOM
  5. Add, Update, delete Events
  6. CSS manipulation with use of jquery
  7. We can add JavaScript Plugins
  8. DOM traversal and modification with use of jquery


Question: Can constructors be parameterized?
Yes, It can be.


Question: What is Bootstrap, Extension and System Class loader? Can you explain primordial class loader?
Bootstrap class loader
Bootstrap class loader loads those classes those which are essential for JVM to function properly. Bootstrap class loader is responsible for loading all core java classes for instance java.lang.*, java.io.* etc.

The extension class loader
The extension class loader also termed as the standard extensions class loader is a child of the bootstrap class loader. Its primary responsibility is to load classes from the extension directories, normally located the "jre/lib/ext" directory. This provides the ability to simply drop in new extensions, such as various security extensions, without requiring modification to the user's class path.

The system class loader
The system class loader also termed application class loader is the class loader responsible for loading code from the path specified by the CLASSPATH environment variable. It is also used to load an application’s entry point class that is the "static void main ()" method in a class.




Question: How to Merge the contents of two or more objects together into the one/first object?.
jQuery.extend( [ deep ], targetobject, [ object List] )



Question: How do I check if an element is hidden in jQuery?
Since the question refers to a single element, this code might be more suitable.

// Checks CSS content for display:[none|block], ignores visibility:[true|false]
$(element).is(":visible");

// The same works with hidden
$(element).is(":hidden");




Question: How do I redirect to another webpage??
// similar behavior as an HTTP redirect
window.location.replace("https://www.web-technology-experts-notes.in/");

// similar behavior as clicking on a link
window.location.href = "https://www.web-technology-experts-notes.in/";