1. jQuery does not contain the _____________ feature.
c) CSS manipulation
d) Effects and animations
2. What is the correct syntax of jQuery?
Explanation: The basic syntax of jQuery is $(selector).action(), $ sign defines access of jQuery, (selector) is HTML element, action() is for the jQuery action that is to be performed. E.g. $(“h1”).hide(), this will hide all the <h1> elements.
3. In jQuery all the elements are selected by writing ____________
Explanation: In jQuery all the elments are selected by writing $(“*”). $(this) helps in selecting current HTML element. All the button elements are selected by writing $(“:button”). If we want to select a specific class we should write $(“.class_name”).
4. Which of the following is not event method in jQuery?
Explanation: The actions that can be performed on the web page are called events. Some common DOM events are blur(), click(), bilnd(), change(), dbclick(), eroor(), delegate(), die(), event.data, event.currentTarget, event.pageX, mouseenter(), mousedown(), event.result, event.target, focus(), hover(), keydown(), focusout(), live(), load(), keyup() etc.
5. hover() method is the combination of ____________
a) mouseleave() and mouseeneter()
b) mousedown() and mouseenter()
c) mouseup() and mousedown()
d) mouseleave() and mousedown()
Explanation: hover() method is the combination of mouseleave() and mouseenter(). It takes two functions. When the mouse leaves HTML element then mouseleave() function is called and when mouse enters HTML element then mouseenter() function is called.
6. Which of the following is not the fade method in jQuery?
Explanation: jQuery has various fade methods including fadeout(), fadeTo(), fadeToggle(), fadeIn().
The syntax of fadeIn() is $(selector).fadeIn(speed,callback);
For fadeout() we use $(selector).fadeOut(speed,callback);
For fadeToggle we use $(slecetor).fadeToggle(speed,callback);
For fadeTo() syntax is $(selector).fadeTo(speed,opacity,callback).
7. Which of the following is not the sliding method in jQuery?
Explanation: jQuery have three slide methods namely slideUp(), slideDown() and slideToggle().
Syntax for slideDown() is $(selector).slideDown(speed,callback);
For slideUp() we use $(selector).slideUp(speed,callback).
For slideToggle() method the syntax is $(selector).slideToggle(speed,callback).
8. Which of the following is not the jQuery method for manipulation?
Explanation: For attributes manipulation we use three methods named html(), text() and val(). The content of selected elements is returned by html(). The text content of selected elements is returned by text(). The values of form fields is returned by val().
9. The method not used to add new content is ___________
Explanation: In jQuery there are four methods to add new content namely prepend(), before(), after(), append(). The append() method inserts at the end, prepend() method inserts at the beginning of the content, after() method inserts the content after selected HTML element, befor() inserts before the selected HTML element.
10. Which method is not used for CSS manipulation?
Explanation: There are several functions for CSS manipulation. Some of them are css(), removeClass(), toggleClass(), addClass(). The style attribute is returned by css() method. Classes are added by addClass() method. Classes are removed by removeClass() method. The toggling between adding and removing classes is achieved by toggleClass() method.
11. Which of the following is not a jQuery dimension method?
Explanation: There are various important methods for dimension. Some of them are height(), innerHeight(), outerWidth(), outerHeight(), width(), innerWidth(). Width() method includes border, margin and padding. innerWidth() and innerHeight() method includes padding. outerHeight() and outerWidth() method includes border and padding. CSS() method is used for CSS manipulation in jQuery.
12. Which method is not used for traversing DOM tree?
Explanation: There are three methods for the traversal of DOM tree. Parent(), parentsUntil(), parents(). Direct parent element is returned by parent() method. All the ancestor elements are returned by parents() method. All the ancestor elements that are between given two arguments are returned by parentsUntil() method.
13. Which method is not for traversing DOM tree sideways?
Explanation: There are methods for traversing DOM tree sideways. Some of them are next(), prev(), prevAll(), nextAll(), siblings(), prevUntil(), next(). All the sibling elements are returned by siblings() method. The next sibling is returned by next() method. All the next siblings are returned by nextAll() method.
14. Which method is not used for filtering in jQuery?
Explanation: The basic filtering methods are eq(), not(), filter(), last() and first(). The first element is returned by first() method, last element is returned by last() method, the specific index number of element is returned by eq() method.
15. AJAX is not used in _____________
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.