Core JQuery Interview Questions And Answers Questilly Core .

5m ago
7 Views
1 Downloads
734.92 KB
6 Pages
Last View : 30d ago
Last Download : 3m ago
Upload by : Anton Mixon
Transcription

Core jQuery Interview Questions and Answers www.questilly.com Core jQuery Interview Questions and Answers – PDF 1. What is mean by chained method calls in jQuery? Answer: It is an attractive feature of jQuery, where you can call one method after another by chaining method calls on the backs of one another if the API supports it. Example: (' div /') .addClass('selected') .attr({ id : 'body' title : 'Welcome to jQuery' }) .text("Hello, These are the important JQuery Interview Questions"); 2. What are the main advantage of jQuery? Answer: It is simplistic, chainable, and comprehensive. Moreover jQuery have the ability to make iterating and traversing the DOM much easier via its various built-in methods. Another advantage is, jQuery makes it easy to add your own custom methods via its simple-tounderstand plug-in architecture. Also jQuery helps reduce redundancy in navigation and UI functionality, like tabs, CSS, and markup-based pop-up dialogs, animations, and transitions, and lots of other things. 3. Is jQuery the only JavaScript frame work? Answer: No, certainly not. There are several JavaScript frameworks like Yahoo UI, Prototype, SproutCore, Dojo, and so on 4. What are the rules to be followed while creating a XHTML and CSS documents? Answer: 1. When selecting id and class names, make sure that they are descriptive and are contained in a namespace. Because client might needed to combine one project with another in future. 2. Make your CSS more specific and avoid using generic type selectors while defining CSS. This will help to avoid conflicts. 3. Always organize your files in a coherent manner. For example group files from the project in the same folder and separate multiples projects in different folders. This will help to easily locate and associate files to your projects. 4. Avoid inaccessible markups and stay away from frames where possible. Always try to organize your markups by semantically elements like paragraphs in p and lists in ul or ol elements. Use h1 to h6 for headings and so on. 5. Have a practice of using small, modularized files organized by the components for better loading efficiency and combine and compress those modularized files for the live production site. View More : estions-and-answers-pdf-download/

Core jQuery Interview Questions and Answers www.questilly.com 5. What is Name Spacing? Answer: Namespacing is the concept of making your programs, source code, and so on tailored to a particular naming convention, in an effort to make your programs more portable and more capable of living in diverse, foreign programming environments. 6. What are some common id names that people use in style sheets? Answer: body, header, footer, column, left, right etc 7. How can you improve the efficiency of Markup and CSS? Answer: 1. Try server-side gzip compression. Most of the time, gzip may make files load more quickly. This will help your user to see contents as quickly as possible. 2. By using aggressive client-side caching. This will makes subsequent pages loads much faster. 3. Using automatic compression of markup content by removing excess white space and comments from the markup source. 8. What are the common JavaScript conventions followed in the programming industry? Answer: 1. Include all script in external documents - JavaScript code should be included only in external script files. Script should not be embedded in markup documents or be included inline, directly on markup elements. 2. Write clean, consistent code - JavaScript code should be neatly formatted and organized in a consistent, predicable way. 3. Namespace JavaScript code - JavaScript variables, functions, objects, and the like should be namespaced to minimize potential namespace conflicts and collisions with other JavaScript. 4. Avoid browser detection - Browser detection should be avoided where possible. Instead, detect specific browser features 9. What are the element's relative commonly used in jQuery API? Answer: 1. parent() and parents() are used to select an element’s parent or ancestors. 2. children() is used to select an element’s immediate children. 3. siblings() is used to select all of an element’s surrounding sibling elements. 4. prev() is used to select an element’s immediate preceding sibling. 5. next() is used to select an element’s immediate following sibling. 6. prevAll() is used to select all siblings coming before an element. 7. nextAll() is used to select all siblings coming after an element. 8. not() is used to remove elements from a selection using a selector. 9. eq() is used to zero in on a single element in a selection by providing its offset position within the selection offset from zero. 10. What do you mean by Slicing a Selection? Answer: The slice() method is similar to the eq() method; it selects a subset of a View More : estions-and-answers-pdf-download/

Core jQuery Interview Questions and Answers www.questilly.com selection based on the off set position of elements in a selection. It does this using one or two arguments. If you provide just one argument, you provide the starting point for the slice. Example: !DOCTYPE HTML html xmlns "http://www.w3.org/1999/xhtml" head meta http-equiv "content-type" content application/xhtml xml; charset utf-8" / meta http-equiv "content-language" content "en-us" / title Place in Middle-Earth /title /head body ul li The Shire /li li Fangorn Forest /li li Rohan /li li Mordor /li /ul /body /html 11. What are the important JavaScript functions? Answer: charAt() - Returns the character at the specified index. concat() - Combines the text of two strings and returns a new string. forEach() - Calls a function for each element in the array. indexOf() - Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found. length() - Returns the length of the string. pop() - Removes the last element from an array and returns that element. push() - Adds one or more elements to the end of an array and returns the new length of the array. reverse() - Reverses the order of the elements of an array the first becomes the last, and the last becomes the first. sort() - Sorts the elements of an array. substr() - Returns the characters in a string beginning at the specified location through the specified number of characters. toLowerCase() - Returns the calling string value converted to lower case. toString() - Returns the string representation of the number's value. toUpperCase() - Returns the calling string value converted to uppercase. 12. What do you mean by Tag name, Tag ID, Tag class? Answer: Tag Name : Represents a tag name available in the DOM. For example ('p') selects all paragraphs p in the document. View More : estions-and-answers-pdf-download/

Core jQuery Interview Questions and Answers www.questilly.com Tag ID : Represents a tag available with the given ID in the DOM. For example ('#some id') selects the single element in the document that has an ID of some-id. Tag Class : Represents a tag available with the given class in the DOM. For example ('.some-class') selects all elements in the document that have a class of some class. Repeated jQuery Interview Questions 13. What do you mean by Selectors, brief a few selectors with examples? Answer: selectors are very useful and would be required at every step while using jQuery. They get the exact element that you want from your HTML document. Examples : Name : Selects all elements which match with the given element Name. #ID : Selects a single element which matches with the given ID. .Class : Selects all elements which matches with the given Class. Universal (*) : Selects all elements available in a DOM. Multiple Elements E, F, G : Selects the combined results of all the specified selectors E, F or G. 14. What do you mean by Callback in jQuery? Answer: A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered. Example: ("body").click(function(event) { console.log("clicked: " event.target); }); 15. What do you mean by jQuery Syntax? Answer: jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s). Basic syntax is: (selector).action() 1. A sign to define/access jQuery 2. A (selector) to "query (or find)" HTML elements 3. A jQuery action() to be performed on the element(s) Examples: (this).hide() - hides the current element. ("p").hide() - hides all p elements. (".test").hide() - hides all elements with class "test". 16. What are the common manipulation methods used in jQuery like appendTo()? Answer: 1. append() 2. prepend() 3. prependTo() View More : estions-and-answers-pdf-download/

Core jQuery Interview Questions and Answers www.questilly.com 4. after() 5. before() 6. insertAfter() 7. insertBefore() 8. wrap() 9. wrapAll() 10. wrapInner() 17. You need to select elements based on attributes and those attribute's values. How will you do this in jQuery? Answer: We can use an attribute selectors to match specific attributes and corresponding values. jQuery('a[href "http://google.com"]'); The preceding selector would select all anchor elements with an href attribute equal to the value specified (http://google.com). There are a number of ways we can make use of the attribute selector like; [attr] - Matches elements that have the specified attribute. [attr val] - Matches elements that have the specified attribute with a certain value. [attr! val] - Matches elements that don’t have the specified attribute or value. [attr val] - Matches elements with the specified attribute and that start with a certain value. [attr val] - Matches elements that have the specified attribute and that end with a certain value. 18. What are the methods used to find an elements position in jQuery? Answer: jQuery offers three methods that are useful in determining an element’s position offset Returns an object containing the position of the top-left corner of the element relative to the document’s top-left corner position Returns an object containing the position of the top-left corner of the element relative to the top-left corner of the first positioned parent of the element (the offsetParent). offsetParent Returns a jQuery object containing the offsetParent of the element. 19. How can we specifically select elements that are animated in jQuery ? Answer: We can use :animated filter to specifically select elements which will match only elements that are currently animating jQuery('div:animated'); 20. What you mean by scope of a variable in jQuery? Answer: The scope of a variable is the region of your program in which it is defined. JavaScript variable will have only two scopes. Global Variables: A global variable has global scope which means it is defined everywhere in View More : estions-and-answers-pdf-download/

Core jQuery Interview Questions and Answers www.questilly.com your JavaScript code. Local Variables: A local variable will be visible only within a function where it is defined. Function parameters are always local to that function. These are the core jQuery Interview Questions which are frequently asked in interviews for both freshers and experienced jobs. You can download these as PDF by clicking below button. Thank You for Reading :) Please Add Your Comments To: stions-and-answers-pdf-download/ View More : estions-and-answers-pdf-download/

title : 'Welcome to jQuery' }) .text("Hello, These are the important JQuery Interview Questions"); 2. What are the main advantage of jQuery? Answer: It is simplistic, chainable, and comprehensive. Moreover jQuery have the ability to make iterating and traversing the DOM much easier via its various built-in methods. Another

Related Documents:

Chapter 1: Getting started with jQuery 2 Remarks 2 Versions 2 Examples 3 jQuery Namespace ("jQuery" and " ") 3 Getting Started 3 Explanation of code 4 Include script tag in head of HTML page 5 Avoiding namespace collisions 6 Loading jQuery via console on a page that does not have it. 8 The jQuery Object 8 Loading namespaced jQuery plugins 8 .

jQuery is the starting point for writing any jQuery code. It can be used as a function jQuery(.) or a variable jQuery.foo. is an alias for jQuery and the two can usually be interchanged for each other (except where jQuery.noConflict(); has been used - see Avoiding namespace collisions). Assuming we have this snippet of HTML -

jQuery is the starting point for writing any jQuery code. It can be used as a function jQuery(.) or a variable jQuery.foo. is an alias for jQuery and the two can usually be interchanged for each other (except where jQuery.noConflict(); has been used - see Avoiding namespace collisions). Assuming we have this snippet of HTML -

Below is the list of latest and updated jQuery interview questions and their answers for fresher as well as experienced developers. These interview question covers latest version of jQuery which is jQuery 2.0. These interview questions will help you to prepare for the interviews, for quick revision and provide strength to your technical skills. Q1.

To get started with the jQuery UI library, you'll need to add the jQuery script, the jQuery UI script, and the jQuery UI stylesheet to your HTML. First, download jQuery UI; choose the features you need on the download page.

browsers. However, the jQuery team has taken care of this for us, so that we can write AJAX functionality with only one single line of code jQuery - AJAX load() Method jQuery load() Method The jQuery load() method is a simple, but powerful AJAX method. The load() method loads data from a server and puts the returned data into the selected element.

jQuery UI 1.8.16 jQuery Timepicker Addon 1.4.5 jquery-2.1.0 jQuery-ui-1.10.4 jquery-2.1.0 jQuery.event.drag - v 2.2 . WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH T

Abrasive water jet can do this with quality results but, generally is too expensive compared to plasma, laser or punching. 5. Cut Geometry Abrasive waterjet cuts have straight edges with a slight amount of taper. Kerf width is controlled by the orifice/nozzle combination. Cuts in thicker materials generally require larger combinations with more abrasive usage. The kerf width can be as small as .