Home / Interview / JQuery :: General Questions

Interview :: JQuery

11) Is it possible that jQuery HTML work for both HTML and XML document?

No, jQuery HTML only works for HTML document. It doesn't work for XML documents.

12) What is the use of html() method in JQuery?

The jQuery html() method is used to change the entire content of the selected elements. It replaces the selected element content with new contents.

Syntax:

For complete example: "

13) What is the use of css() method in JQuery?

The jQuery CSS() method is used to get (return)or set style properties or values for selected elements. It facilitates you to get one or more style properties. The jQuery CSS() provides two ways:

Return a CSS property

It is used to get the value of a specified CSS property.

Set a CSS property

This property is used to set a specific value for all matched element.

14) Is jQuery library used for server scripting or client scripting?

It is a library for client-side Scripting.

15) Is jQuery a W3C standard?

No, jQuery is not a W3C standard.

16) What is the starting point of code execution in jQuery?

$(document).ready() function is the starting point of jQuery code. It is executed when DOM is loaded.

17) What is the basic requirement to start with the jQuery?

You need refer to its library to start with jQuery. You can download the latest version of jQuery from jQuery.com.

18) Can you use any other name in place of $ (dollar sign) in jQuery?

Yes, instead of $ (dollar sign) we can use jQuery as a function name. For example:

19) Can you use multiple document.ready() function on the same page?

Yes. You can use any number of document.ready() function on the same page. For example:

20) What is the difference between find and children methods?

Find method is used to find all levels down the DOM tree while children method is used to find single level down the DOM tree.