Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
19 views40 pages

100+ JQuery CCEE MCQ

The document provides a list of various projects developed using Spring Boot, React JS, and MySQL, along with their respective YouTube links. It also includes a section of multiple-choice questions (MCQs) focused on jQuery, covering its features, usage, and syntax. The document serves as a resource for learning and practicing jQuery concepts and project development.

Uploaded by

Ram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views40 pages

100+ JQuery CCEE MCQ

The document provides a list of various projects developed using Spring Boot, React JS, and MySQL, along with their respective YouTube links. It also includes a section of multiple-choice questions (MCQs) focused on jQuery, covering its features, usage, and syntax. The document serves as a resource for learning and practicing jQuery concepts and project development.

Uploaded by

Ram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Explore More

Subcription : Premium CDAC NOTES & MATERIAL @99

Contact to Join Click to Join


Premium Group Telegram Group

For More E-Notes


Join Our Community to stay Updated

TAP ON THE ICONS TO JOIN!


Project List

pg. 1 contact us on 8007592194 / 9284926333 www.codewitharrays.in


Project List

pg. 2 contact us on 8007592194 / 9284926333 www.codewitharrays.in


Project List

pg. 3 contact us on 8007592194 / 9284926333 www.codewitharrays.in


Project List

Spring Boot + React JS + MySQL Project List


Sr.No Project Name YouTube Link
1 Online E-Learning Hub Platform Project https://youtu.be/KMjyBaWmgzg?si=YckHuNzs7eC84-IW
2 PG Mate / Room sharing/Flat sharing https://youtu.be/4P9cIHg3wvk?si=4uEsi0962CG6Xodp
3 Tour and Travel System Project Version 1.0 https://youtu.be/-UHOBywHaP8?si=KHHfE_A0uv725f12
4 Marriage Hall Booking https://youtu.be/VXz0kZQi5to?si=llOS-QG3TpAFP5k7
5 Ecommerce Shopping project https://youtu.be/vJ_C6LkhrZ0?si=YhcBylSErvdn7paq
6 Bike Rental System Project https://youtu.be/FIzsAmIBCbk?si=7ujQTJqEgkQ8ju2H
7 Multi-Restaurant management system https://youtu.be/pvV-pM2Jf3s?si=PgvnT-yFc8ktrDxB
8 Hospital management system Project https://youtu.be/IynIouBZvY4?si=CXzQs3BsRkjKhZCw
9 Municipal Corporation system Project https://youtu.be/cVMx9NVyI4I?si=qX0oQt-GT-LR_5jF
10 Tour and Travel System Project version 2.0 https://youtu.be/_4u0mB9mHXE?si=gDiAhKBowi2gNUKZ

Sr.No
Project Name YouTube Link
11 Tour and Travel System Project version 3.0 https://youtu.be/Dm7nOdpasWg?si=P_Lh2gcOFhlyudug
12 Gym Management system Project https://youtu.be/J8_7Zrkg7ag?si=LcxV51ynfUB7OptX
13 Online Driving License system Project https://youtu.be/3yRzsMs8TLE?si=JRI_z4FDx4Gmt7fn
14 Online Flight Booking system Project https://youtu.be/m755rOwdk8U?si=HURvAY2VnizIyJlh
15 Employee management system project https://youtu.be/lD1iE3W_GRw?si=Y_jv1xV_BljhrD0H
16 Online student school or college portal https://youtu.be/4A25aEKfei0?si=RoVgZtxMk9TPdQvD
17 Online movie booking system project https://youtu.be/Lfjv_U74SC4?si=fiDvrhhrjb4KSlSm
18 Online Pizza Delivery system project https://youtu.be/Tp3izreZ458?si=8eWAOzA8SVdNwlyM
19 Online Crime Reporting system Project https://youtu.be/0UlzReSk9tQ?si=6vN0e70TVY1GOwPO
20 Online Children Adoption Project https://youtu.be/3T5HC2HKyT4?si=bntP78niYH802I7N
pg. 4 contact us on 8007592194 / 9284926333 www.codewitharrays.in
jQuery Multiple-Choice Questions (MCQs)
jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well
as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT
License.

jQuery MCQs: This section contains jQuery Multiple-Choice Questions with Answers. These jQuery
MCQs are written for beginners as well as advanced, practice these MCQs to enhance and test the
knowledge of jQuery.

List of jQuery MCQs


1. jQuery is a ______.

A. JavaScript Library
B. JSON Library

4
C. Java Library

9
D. JSON and CSS Library

21
Answer: A) JavaScript Library

59
07
Explanation:
80

jQuery is a JavaScript Library.


.in

Discuss this Question


ys
ra
ar

2. To work with jQuery, you should have the basic knowledge of these topics?
ith

A. HTML
w

B. CSS
de

C. JavaScript
co

D. All of the above

Answer: D) All of the above

Explanation:

To work with jQuery, you should have the basic knowledge of HTML, CSS, and JavaScript.

Discuss this Question

3. Who developed jQuery?

A. John Richard
B. John Resig
C. John Carter
D. John Alexander
Answer: B) John Resig

Explanation:

John Resig developed jQuery.

Discuss this Question

4. In which year jQuery was initial released?

A. 2004
B. 2005
C. 2006
D. 2007

Answer: C) 2006

49
Explanation:

21
jQuery was initial released on August 26, 2006.

59
07
Discuss this Question
80
.in

5. Is jQuery case-sensitive?
ys

A. Yes
ra

B. No
ar

Answer: A) Yes
ith
w

Explanation:
de

Yes, jQuery is case-sensitive.


co

Discuss this Question

6. Which feature(s) jQuery contains?

A. HTML/DOM manipulation
B. CSS manipulation
C. HTML event methods
D. Effects and animations
E. AJAX
F. Utilities
G. All of the above

Answer: G) All of the above


Explanation:

All of the above features jQuery contains.

Discuss this Question

7. Which sign is used to define/access jQuery?

A. $
B. .
C. &
D. #

Answer: A) $

Explanation:

9 4
$ sign is used to define/access jQuery.

21
59
Discuss this Question
07
80

8. Which jQuery is used to hide the current element?


.in

A. $(this).hideelement()
B. $(this).hide('true')
ys

C. $(this).hide(0)
ra

D. $(this).hide()
ar
ith

Answer: D) $(this).hide()
w

Explanation:
de

The $(this).hide() method is used to hide the current element.


co

Discuss this Question

9. Which is the correct jQuery statement to hide all <div> elements?

A. $("div").hide()
B. $(div).hide()
C. $(".div").hide()
D. $("#div").hide()

Answer: A) $("div").hide()

Explanation:

The $("div").hide() statement can be used to hide all <div> elements.


Discuss this Question

10. Which is the correct jQuery statement to hide all elements having class name "new"?

A. $("new").hide()
B. $(new).hide()
C. $(".new").hide()
D. $("#new").hide()

Answer: C) $(".new").hide()

Explanation:

The $(".new").hide() statement can be used to hide all elements having class name "new".

Discuss this Question

9 4
21
11. Which is the correct jQuery statement to hide all elements having id name "new"?

A. $("new").hide()
59
07
B. $(new).hide()
80

C. $(".new").hide()
D. $("#new").hide()
.in
ys

Answer: D) $("#new").hide()
ra

Explanation:
ar
ith

The $("#new").hide() statement can be used to hide all elements having id name "new".
w

Discuss this Question


de
co

12. What is the use of jQuery Selectors?

A. jQuery selectors are used to select and manipulate HTML element(s).


B. jQuery selectors are used to import the HTML elements from the other file.
C. jQuery selectors are used to select and manipulate JSON elements(s).
D. jQuery selectors are used to select and manipulate ReactJS classes.

Answer: A) jQuery selectors are used to select and manipulate HTML element(s)

Explanation:

jQuery selectors are used to select and manipulate HTML element(s).

Discuss this Question


13. Which is the correct jQuery selector statement to select all <div> elements?

A. $(".div")
B. $("#div")
C. $("div")
D. $("<div>")

Answer: C) $("div")

Explanation:

The statement $("div") is the correct syntax to select all <div> elements.

Discuss this Question

14. Which sign is used for class selector?

94
A. $class

21
B. .class
C. #class

59
D. None 07
Answer: C) .class
80

Explanation:
.in
ys

The dot sign (.) i.e., .class is used for the class selector.
ra

Discuss this Question


ar
ith
w

15. Which sign is used for id selector?


de

A. $id
co

B. .id
C. #id
D. None

Answer: C) #id

Explanation:

The hash sign ( # ) i.e., #id is used for the id selector.

Discuss this Question

16. Why #id selectors are used for?

A. To select all elements having the id


B. To select all elements without having the id
C. To select all elements having the id within a specified <div>
D. To select all elements having the id within a specified section.

Answer: C) To select all elements having the id within a specified <div>

Explanation:

The #id selectors are used to select all elements having the id.

Discuss this Question

17. Which is the correct jQuery selector to select all elements?

A. $("all")
B. $("*.*")
C. $("*")

4
9
D. $("***")

21
Answer: C) $("*")

59
07
Explanation:
80

The $("*") selector is used to select all elements.


.in

Discuss this Question


ys
ra
ar

18. Which is the correct jQuery selector to select current HTML element?
ith

A. $(this)
w

B. $(cur)
de

C. $(.this)
co

D. $(#this)

Answer: A) $(this)

Explanation:

The $(this) selector is used to select current HTML elements.

Discuss this Question

19. Which is the correct jQuery selector to select all <div> elements with class name "new"?

A. $(".new")
B. $("div.new")
C. $(".div.new")
D. $(".div#new")
Answer: B) $("div.new")

Explanation:

The $("div.new") selector is used to select all <div> elements with class name "new".

Discuss this Question

20. Which is the correct jQuery selector to select the first HTML element?

A. $("element_name.first")
B. $("element_name#first")
C. $("element_name::first")
D. $("element_name:first")

Answer: D) $("element_name:first")

9 4
Explanation:

21
The $("element_name:first") selector is used to select the first HTML element.

59
07
Discuss this Question
80
.in

21. Which is the correct jQuery selector to select the first <div> of the HTML document?
ys

A. $("div.first")
ra

B. $("div#first")
ar

C. $("div::first")
ith

D. $("div:first")
w

Answer: D) $("div:first")
de

Explanation:
co

The $("div:first") selector is used to select the first <div> of the HTML document.

Discuss this Question

22. Which is the correct jQuery selector to select the first list item of <ul> element?

A. $("ul li:first")
B. $("ul:first")
C. $("li:first")
D. $("ul.li:first")

Answer: A) $("ul li:first")

Explanation:
The $("ul li:first") selector is used to select the first list item of <ul> element.

Discuss this Question

23. Which is the correct jQuery selector to select the first list item of every <ul> element?

A. $("ul li:first-child")
B. $("ul li:first.*")
C. $("li:first-child")
D. $("ul:first-child")

Answer: A) $("ul li:first-child")

Explanation:

The $("ul li:first-child") selector is used to select the first list item of every <ul> element.

9 4
Discuss this Question

21
59
24. Which is the correct jQuery selector to select all elements having "href" attribute?
07
80

A. $("a.[href]")
B. $("a:[href]")
.in

C. $("[href].*")
ys

D. $("[href]")
ra

Answer: D) $("[href]")
ar
ith

Explanation:
w

The $("[href]") selector is used to select all elements having href attribute.
de
co

Discuss this Question

25. Which is the correct jQuery selector to select all <button> elements and <input> elements
with type="input"?

A. $(".button")
B. $(":button")
C. $("button","input type="button")
D. $(":button,:input")

Answer: B) $(":button")

Explanation:

The $(":button") selector is used to select all <button> elements and <input> elements
with type="input" .
Discuss this Question

26. Which is the correct jQuery selector to select all even table rows?

A. $("tr::even")
B. $("tr.even")
C. $("tr:even")
D. $("tr:#even")

Answer: C) $("tr:even")

Explanation:

The $("tr:even") selector is used to select all even table rows.

Discuss this Question

9 4
21
27. Which is the correct jQuery selector to select all odd table rows?

A. $("tr::odd")
59
07
B. $("tr.odd")
80

C. $("tr:odd")
D. $("tr:#odd")
.in
ys

Answer: C) $("tr:odd")
ra

Explanation:
ar
ith

The $("tr:odd") selector is used to select all odd table rows.


w

Discuss this Question


de
co

28. Which method is used to attach an event handler function to an HTML element on mouse
click?

A. click()
B. Click()
C. dblclick()
D. DblClick()

Answer: A) click()

Explanation:

The jQuery method click() is used to attach an event handler function to an HTML element on
mouse click.
Discuss this Question

29. Which method is used to attach an event handler function to an HTML element on mouse
double click?

A. click()
B. Click()
C. dblclick()
D. DblClick()

Answer: C) dblclick()

Explanation:

The jQuery method dblclick() is used to attach an event handler function to an HTML element on
mouse double click.

9 4
Discuss this Question

21
59
07
30. Which method is used to attach an event handler function to an HTML element when the
mouse pointer enters the HTML element?
80

A. mouseover()
.in

B. mousevisit()
ys

C. mouse-enter()
ra

D. mouseenter()
ar

Answer: D) mouseenter()
ith

Explanation:
w
de

The jQuery method mouseenter() is used to attach an event handler function to an HTML element
co

when the mouse pointer enters the HTML element.

Discuss this Question

31. Which method is used to attach an event handler function to an HTML element when the
mouse pointer leaves the HTML element?

A. mouseLeave()
B. mouseleave()
C. mouse-leave()
D. mouseexit()

Answer: B) mouseleave()

Explanation:
The jQuery method mouseleave() is used to attach an event handler function to an HTML element
when the mouse pointer leaves the HTML element.

Discuss this Question

32. Which method is used to attach an event handler function to an HTML element when the left,
middle or right mouse button is pressed down, while the mouse is over the HTML element?

A. mousedown()
B. mouseover()
C. mousepress()
D. mousekey()

Answer: A) mousedown()

Explanation:

9 4
The jQuery method mousedown() is used to attach an event handler function to an HTML element

21
when the left, middle or right mouse button is pressed down, while the mouse is over the HTML

59
element.
07
Discuss this Question
80
.in

33. Which method is used to attach an event handler function to an HTML element when the left,
ys

middle or right mouse button is released, while the mouse is over the HTML element?
ra

A. mouseup()
ar

B. mouseover()
ith

C. mouseabove()
w

D. mousekey()
de

Answer: A) mouseup()
co

Explanation:

The jQuery method mouseup() is used to attach an event handler function to an HTML element when
the left, middle or right mouse button is released, while the mouse is over the HTML element.

Discuss this Question

34. Which method is used to attach an event handler function to an HTML element when the
mouse moves over the HTML elements?

A. mousemove()
B. mouseover()
C. hover()
D. mousehover()
Answer: C) hover()

Explanation:

The jQuery method hover() is used to attach an event handler function to an HTML element when the
mouse moves over the HTML elements.

Discuss this Question

35. Which method is used to attach an event handler function to an HTML element when the
form field gets focus?

A. focused()
B. focuses()
C. focuselement()
D. focus()

9 4
Answer: D) focus()

21
Explanation:

59
07
The jQuery method focus() is used to attach an event handler function to an HTML element when the
form field gets focus.
80
.in

Discuss this Question


ys
ra

36. Which method is used to attach an event handler function to an HTML element when the
ar

form field loses focus?


ith

A. blur()
w

B. leave()
de

C. focusleave()
co

D. leavefocus()

Answer: A) blur()

Explanation:

The jQuery method blur() is used to attach an event handler function to an HTML element when the
form field loses focus.

Discuss this Question

37. Which method is used to attach one or more event handlers for the selected elements?

A. at()
B. atelements()
C. on()
D. focuson()

Answer: C) on()

Explanation:

The jQuery method on() is used to attach one or more event handlers for the selected elements.

Discuss this Question

38. What is the use of jQuery method toggle()?

A. To hide shown elements and to show hidden elements


B. To remove current element
C. To shift current element at the previous position
D. All of the above

9 4
Answer: A) To hide shown elements and to show hidden elements

21
Explanation:

59
The toggle() method is used to hide the shown elements and to show the hidden elements.
07
80

Discuss this Question


.in
ys

39. Which jQuery method is used to fade in a hidden element?


ra

A. fade()
ar

B. fadeIn()
ith

C. fadeOut()
w

D. fadeToggle()
de

Answer: B) fadeIn()
co

Explanation:

The jQuery fadeIn() method is used to fade in a hidden element.

Discuss this Question

40. What is the syntax of jQuery fadeIn() method?

A. $(selector).fadeIn();
B. $(selector).fadeIn(callback, speed);
C. $(selector).fadeIn(callback);
D. $(selector).fadeIn(speed,callback);

Answer: D) $(selector).fadeIn(speed,callback);
Explanation:

The syntax of jQuery method fadeIn() is:

$(selector).fadeIn(speed,callback);

Discuss this Question

41. Which jQuery method is used to fade out a visible element?

A. fadeout()
B. fadeIn()
C. fadeOut()
D. fadeToggle()

Answer: C) fadeOut()

9 4
Explanation:

21
59
The jQuery fadeOut() method is used to fade out a visible element.
07
Discuss this Question
80
.in

42. What is the syntax of jQuery fadeOut() method?


ys

A. $(selector).fadeOut();
ra

B. $(selector).fadeOut(callback, speed);
ar

C. $(selector).fadeOut(callback);
ith

D. $(selector).fadeOut(speed,callback);
w
de

Answer: D) $(selector).fadeOut(speed,callback);
co

Explanation:

The syntax of jQuery method fadeOut() is:

$(selector).fadeOut(speed,callback);

Discuss this Question

43. Which jQuery method toggles between the fadeIn() and fadeOut() methods?

A. toggle()
B. Toggle()
C. fadeToggle()
D. fadetoggle()
Answer: C) fadeToggle()

Explanation:

The jQuery fadeToggle() method toggles between the fadeIn() and fadeOut() methods.

Discuss this Question

44. What is the syntax of jQuery fadeToggle() method?

A. $(selector).fadeToggle();
B. $(selector).fadeToggle(callback, speed);
C. $(selector).fadeToggle(callback);
D. $(selector).fadeToggle(speed,callback);

Answer: D) $(selector).fadeToggle(speed,callback);

9 4
Explanation:

21
The syntax of jQuery method fadeToggle() is:

59
07
$(selector).fadeToggle(speed,callback);
80

Discuss this Question


.in
ys

45. Which jQuery method allows fading to a given opacity (value between 0 and 1)?
ra
ar

A. fade()
ith

B. fadeOpacity()
w

C. fadeTo()
de

D. fadeto()
co

Answer: C) fadeTo()

Explanation:

The jQuery fadeTo() method allows fading to a given opacity (value between 0 and 1).

Discuss this Question

46. Which is the correct jQuery statement to fade out a <p> element?

A. $("p").fadeOut();
B. $("#p").fadeOut();
C. $(".p").fadeOut();
D. $("p").fadeout();

Answer: A) $("p").fadeOut();
Explanation:

The jQuery statement to fade out a p elements is:

$("p").fadeOut();

Discuss this Question

47. Which is the correct jQuery statement to fade out a <p> element with duration effect "slow"?

A. $("p").fadeOut("slow");
B. $("#p").fadeOut("slow");
C. $(".p").fadeOut("slow");
D. $("p").fadeout();

Answer: A) $("p").fadeOut("slow");

9 4
Explanation:

21
59
The jQuery statement to fade out a <p> elements with duration effect "slow" is:
07
$("p").fadeOut("slow");
80
.in

Discuss this Question


ys
ra

48. Which jQuery method is used to slide down an element?


ar

A. slideBottom()
ith

B. slideDown()
w

C. slidedown()
de

D. slide()
co

Answer: B) slideDown()

Explanation:

The jQuery slideDown() method is used to slide down an element.

Discuss this Question

49. Which jQuery method is used to slide up an element?

A. slideUp()
B. slideBottom()
C. slidebottom()
D. slide()
Answer: A) slideUp()

Explanation:

The jQuery slideUp() method is used to slide up an element.

Discuss this Question

50. Which jQuery method toggles between the slideDown() and slideUp() methods?

A. slide ()
B. slideSwitch()
C. slidetoggle()
D. slideToggle()

Answer: D) slideToggle()

4
9
Explanation:

21
The jQuery slideToggle() method toggles between the slideDown() and slideUp() methods.

59
07
Discuss this Question
80
.in

51. Which jQuery method is used to create custom animations?


ys

A. animation()
ra

B. slidAnimate()
ar

C. animate()
ith

D. SlideAnimate()
w

Answer: C) animate()
de

Explanation:
co

The jQuery animate() method is used to create custom animations.

Discuss this Question

52. What is the correct syntax of animate() method?

A. $(selector).animate({params},speed,callback);
B. $(#selector).animate({params},speed,callback);
C. $(selector).animate(speed,callback);
D. $(selector).animate({speed,callback,params});

Answer: A) $(selector).animate({params},speed,callback);

Explanation:
The correct syntax of animate() method is:

$(selector).animate({params},speed,callback);

Discuss this Question

53. In the syntax of animate() method, why params parameter is used?

A. It is used to define the speed of the animation


B. It is used to define the mouse events on the HTML element
C. It is used to define the CSS property to be animated
D. None of the above

Answer: C) It is used to define the CSS property to be animated

Explanation:

49
The params parameter of jQuery animate() method is used to define the CSS property to be

21
animated.

59
07 Discuss this Question
80
.in

54. In the syntax of animate() method, what is/are the valid value(s) of speed parameter?
ys

A. slow
ra

B. fast
ar

C. milliseconds
D. All of the above
ith
w

Answer: D) All of the above


de

Explanation:
co

The following are the correct value of the speed parameter are:

slow
fast
milliseconds

Discuss this Question

55. Which jQuery method is used to stop an animation before it is finished?

A. animate(false)
B. animate('false')
C. animate("false")
D. stop()
Answer: D) stop()

Explanation:

The jQuery method stop() is used to stop an animation before it is finished.

Discuss this Question

56. What is the correct syntax of stop() method?

A. $(selector).stop(stopAll,goToEnd);
B. $(selector).stop(speed,callback);
C. $(selector).stop(stopAll,goToEnd,callback);
D. $(selector).stop(stopAll,speed);

Answer: A) $(selector).stop(stopAll,goToEnd);

9 4
Explanation:

21
The correct syntax of stop() method is:

59
07
$(selector).stop(stopAll,goToEnd);
80

Discuss this Question


.in
ys

57. In jQuery DOM, what does DOM stand for?


ra
ar

A. Data Object Model


ith

B. Document Object Manipulation


w

C. Document Object Model


de

D. Document On Model
co

Answer: D) Document Object Model

Explanation:

In jQuery DOM, DOM stands for Document Object Model.

Discuss this Question

58. Which jQuery DOM method is used to set or return the text content of selected elements?

A. content()
B. text()
C. html()
D. val()

Answer: B) text()
Explanation:

The jQuery DOM method text() is used to set or return the text content of selected elements.

Discuss this Question

59. Which jQuery DOM method is used to set or return the content of selected elements
(including HTML markup)?

A. content()
B. text()
C. html()
D. val()

Answer: C) html()

Explanation:

9 4
21
The jQuery DOM method html() is used to set or return the content of selected elements (including
HTML markup).

59
07
Discuss this Question
80
.in

60. Which jQuery DOM method is used to set or return the value of form fields?
ys

A. content()
ra

B. text()
ar

C. html()
ith

D. val()
w

Answer: D) val()
de
co

Explanation:

The jQuery DOM method val() is used to set or return the value of form fields.

Discuss this Question

61. Which is the correct jQuery statement to get the text content of an HTML element having id
"notification"?

A. $("notification").text()
B. $("#notification").text()
C. $(".notification").text()
D. $("#notification").val()

Answer: B) $("#notification").text()
Explanation:

The jQuery statement $("#notification").text() will return the text content of the HTML
document having id "notification".

Discuss this Question

62. Which jQuery DOM method is used to get the attribute value?

A. attr()
B. attribute()
C. attrib()
D. val()

Answer: A) attr()

Explanation:

9 4
21
The jQuery DOM method attr() is used to get the attribute value.

59
07 Discuss this Question
80

63. Which is the correct jQuery statement to get the value "href" attribute having id "top"?
.in

A. $("top").attr("href")
ys

B. $(".top").attr("href")
ra

C. $("$top").attr("href")
ar

D. $("#top").attr("href")
ith

Answer: D) $("#top").attr("href")
w
de

Explanation:
co

The jQuery statement $("#top").attr("href") will return the the value href attribute having id
"top".

Discuss this Question

64. Which jQuery DOM method is used to insert content at the end of the selected elements?

A. insert()
B. add()
C. append()
D. appendValue()

Answer: C) append()

Explanation:
The jQuery DOM method append() is used to insert content at the end of the selected elements.

Discuss this Question

65. Which jQuery DOM method is used to insert content at the beginning of the selected
elements?

A. insert()
B. before()
C. append()
D. prepend()

Answer: D) prepend()

Explanation:

The jQuery DOM method prepend() is used to insert content at the beginning of the selected

9 4
elements.

21
59
Discuss this Question
07
80

66. Which jQuery DOM method is used to insert content after the selected elements?
.in

A. after()
ys

B. postpend()
C. addafter()
ra

D. prepend()
ar
ith

Answer: A) after()
w

Explanation:
de
co

The jQuery DOM method after() is used to insert content after the selected elements.

Discuss this Question

67. Which jQuery DOM method is used to insert content before the selected elements?

A. before()
B. addbefore()
C. addprepend()
D. prepend()

Answer: A) before()

Explanation:

The jQuery DOM method before() is used to insert content before the selected elements.
Discuss this Question

68. Which is the correct syntax to insert content at the end of the <p> elements?

A. $("#p").append("Text to be added");
B. $("p").before("Text to be added");
C. $("p").append("Text to be added");
D. $("p").prepend("Text to be added");

Answer: C) $("p").append("Text to be added");

Explanation:

The correct syntax to insert content at the end of the <p> elements is:

$("p").append("Text to be added");

9 4
21
Discuss this Question

59
07
69. Which is the correct syntax to insert content at the beginning of the <p> elements?
80

A. $("#p").before("Text to be added");
.in

B. $("p").addafter("Text to be added");
C. $("p").after("Text to be added");
ys

D. $("p").prepend("Text to be added");
ra
ar

Answer: D) $("p").prepend("Text to be added");


ith

Explanation:
w
de

The correct syntax to insert content at the beginning of the <p> elements is:
co

$("p").prepend("Text to be added");

Discuss this Question

70. Which is the correct syntax to insert content after the <div> elements?

A. $("div").after("Text to be added");
B. $("div").postpend("Text to be added");
C. $("div").addafter("Text to be added");
D. $("#div").after("Text to be added");

Answer: A) $("div").after("Text to be added");

Explanation:
The correct syntax to insert content after the <div> elements is:

$("div").after("Text to be added");

Discuss this Question

71. Which is the correct syntax to insert content before the <div> elements?

A. $("div").before("Text to be added");
B. $("div").pretpend("Text to be added");
C. $("div").addbefore("Text to be added");
D. $("#div").before("Text to be added");

Answer: A) $("div").before("Text to be added");

Explanation:

49
The correct syntax to insert content before the <div> elements is:

21
59
$("div").before("Text to be added"); 07
80
Discuss this Question
.in

72. What is the difference between remove() and empty() methods?


ys
ra

A. remove() removes the selected element and its child elements while empty() removes the child
ar

elements of the selected element


ith

B. remove() removes the child elements of the selected element while empty() removes the selected
elements and its child elements
w

C. remove() removes the child elements while empty() removes the content of the selected element
de

D. remove() removes the child elements while empty() removes the content of the selected element
co

and its child elements

Answer: A) remove() removes the selected element and its child elements while empty() removes the
child elements of the selected element

Explanation:

The difference between remove() and empty() methods is: remove() removes the selected element
and its child elements while empty() removes the child elements of the selected element.

Discuss this Question

73. Write a jQuery statement to remove all child elements only from the element having id
"notif"?

A. $("notif").empty();
B. $("#notif").empty();
C. $(".notif").empty();
D. $("<notif>").empty();

Answer: B) $("#notif").empty();

Explanation:

The jQuery statement to remove all child elements only from the element having id "notif" is:

$("#notif").empty();

Discuss this Question

74. Write a jQuery statement to remove all <p> elements with class="prog"?

4
A. $(".prog").remove();

9
B. $("p").empty(".prog");

21
C. $("p").remove(".prog");

59
D. $("p.prog").remove(); 07
Answer: C) $("p").remove(".prog");
80

Explanation:
.in

The jQuery statement to removes all <p> elements with class="prog" is:
ys
ra

$("p").remove(".prog");
ar
ith

Discuss this Question


w
de
co

75. Write a jQuery statement to remove all <pre> elements with class="prog" and class="old"?

A. $(".prog#old").remove();
B. $("pre").empty(".prog",".old");
C. $("pre").remove(".prog, .old");
D. $("pre.prog.old").remove();

Answer: C) $("pre").remove(".prog, .old");

Explanation:

The jQuery statement to remove all <pre> elements with class="prog" and class="old" is:

$("pre").remove(".prog, .old");

Discuss this Question


76. Which method is used to add CSS class to the selected elements?

A. add()
B. addClass()
C. addClasses()
D. AddClasses()

Answer: B) addClass()

Explanation:

The jQuery method addClass() is used to add CSS class to the selected elements.

Discuss this Question

77. Can we add more than one CSS classes to the selected elements using the addClass() method?

94
A. Yes

21
B. No

59
Answer: A) Yes 07
Explanation:
80

Yes, we can add more than one CSS classes to the selected elements using the addClass() method.
.in
ys

Discuss this Question


ra
ar

78. Which method is used to remove CSS class to the selected elements?
ith
w

A. removeCSS()
de

B. removeClass()
C. removeClasseses()
co

D. RemoveClass()

Answer: B) removeClass()

Explanation:

The jQuery method removeClass() is used to remove CSS class to the selected elements.

Discuss this Question

79. Which method is used to set or get the CSS style attribute?

A. cssAttribute()
B. attribute()
C. attr()
D. css()

Answer: D) css()

Explanation:

The jQuery method css() is used to get or set the CSS style attribute.

Discuss this Question

80. Which is the correct syntax to get the value of a CSS style attribute/property using the css()
method?

A. css("propertyname");
B. css(propertyname);
C. css(".propertyname");
D. css("#propertyname");

9 4
21
Answer: A) css("propertyname");

59
Explanation: 07
The correct syntax to get the value of a CSS style attribute/property using the css() method
80

is: css("propertyname");
.in

Discuss this Question


ys
ra
ar

81. Which is the correct syntax to set the value of a CSS style attribute/property using the css()
ith

method?
w

A. css("propertyname"="value");
de

B. css("propertyname","value");
co

C. css("propertyname":"value");
D. css("propertyname":="value");

Answer: B) css("propertyname","value");

Explanation:

The correct syntax to set the value of a CSS style attribute/property using the css() method is:

css("propertyname","value");

Discuss this Question

82. Which is the correct jQuery statement to set background color and text decoration to all <p>
elements?
A. $("p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
B. $("#p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
C. $("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});
D. $("#p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Answer: C) $("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Explanation:

The correct jQuery statement to set background color and text decoration to all <p> elements is:

$("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Discuss this Question

83. Which jQuery method is used to get or set the width of an HTML element?

9 4
A. cssWidth()

21
B. Csswidth()

59
C. lenght() 07
D. width()
80

Answer: D) width()
.in

Explanation:
ys

The jQuery method width() is used to get or set the width of an HTML element.
ra
ar

Discuss this Question


ith
w
de

84. Which jQuery method is used to get or set the height of an HTML element?
co

A. cssHeight()
B. CssHeight()
C. height()
D. getHeight()

Answer: C) height()

Explanation:

The jQuery method height() is used to get or set the height of an HTML element.

Discuss this Question

85. Which jQuery methods are used to get or set the width and height of an HTML element
including the paddings?
A. innerWidth() and innerHeight()
B. width() and height()
C. cssWidth() and cssHeight()
D. elementWidth() and elementHeight()

Answer: A) innerWidth() and innerHeight()

Explanation:

The jQuery methods innerWidth() and innerHeight() are used to get or set the width and height
of an HTML element including the paddings.

Discuss this Question

86. Which jQuery methods are used to get or set the width and height of an HTML element
including the paddings and borders?

94
A. outerWidth() and outerHeight()

21
B. width() and height()

59
C. cssWidth() and cssHeight()
D. elementWidth() and elementHeight()
07
Answer: A) outerWidth() and outerHeight()
80

Explanation:
.in
ys

The jQuery methods outerWidth() and outerHeight() are used to get or set the width and height
ra

of an HTML element including the paddings and borders.


ar

Discuss this Question


ith
w
de

87. Which are the jQuery methods for traversing up the DOM tree?
co

A. parent()
B. parents()
C. parentsUntil()
D. All of the above

Answer: D) All of the above

Explanation:

These are the jQuery methods for traversing up the DOM tree:

i. parent()
ii. parents()
iii. parentsUntil()

Discuss this Question


88. Which jQuery method is used to get the direct parent element of the selected element?

A. parent()
B. parents()
C. parentsUntil()
D. All of the above

Answer: A) parent()

Explanation:

jQuery method parent() is used to get the direct parent element of the selected element.

Discuss this Question

89. Which jQuery method is used to get the all ancestor elements of the selected element, all the

9 4
way up to the document's root element (<html>)?

21
A. parent()

59
B. parents() 07
C. parentsUntil()
D. All of the above
80

Answer: B) parents()
.in
ys

Explanation:
ra

jQuery method parents() is used to get the all ancestor elements of the selected element, all the way
ar

up to the document's root element ( <html> ).


ith
w

Discuss this Question


de
co

90. Which jQuery method is used to get the all ancestor elements between two given arguments?

A. parent()
B. parents()
C. parentsUntil()
D. All of the above

Answer: C) parentsUntil()

Explanation:

jQuery method parentsUntil() is used to get the all ancestor elements between two given
arguments.

Discuss this Question


91. There is a <pre> element, write a jQuery statement to get it's parent?

A. $("pre").parent();
B. $("pre").parents();
C. $("pre").parentsUntil();
D. None of the above

Answer: A) $("pre").parent();

Explanation:

The correct jQuery statement to get the direct parent of a <pre> tag is:

$("pre").parent();

Discuss this Question

9 4
92. Which are the jQuery methods for traversing down the DOM tree?

21
59
A. children()
B. find()
07
C. childrens()
80

D. Both A. and B.
.in

Answer: D) Both A. and B.


ys

Explanation:
ra
ar

These are the jQuery methods for traversing down the DOM tree:
ith

i. children()
w

ii. find()
de
co

Discuss this Question

93. Which jQuery method is used to get all direct children of the selected element?

A. children()
B. find()
C. childrens()
D. Both A. and B.

Answer: A) children()

Explanation:

jQuery method children() is used to get all direct children of the selected element.

Discuss this Question


94. Which jQuery method is used to get descendant elements of the selected element, all the way
down to the last descendant?

A. children()
B. find()
C. childrens()
D. Both A. and B.

Answer: B) find()

Explanation:

jQuery method find() is used to get descendant elements of the selected element, all the way down
to the last descendant.

Discuss this Question

4
9
21
95. What will the following jQuery code do?

59
$(document).ready(function(){
07
$("pre").siblings();
80

});
.in

A. It will return all parent elements of <pre> element


ys

B. It will return all children elements of <pre> element


C. It will return all sibling elements of <pre> element
ra

D. It will return all nonrelative elements of <pre> element


ar
ith

Answer: C) It will return all sibling elements of <pre> element


w

Explanation:
de
co

The above code will return all sibling elements of <pre> element.

Discuss this Question

96. Which is the correct jQuery statement to change the color of all <p> elements which are
sibling elements of <pre>?

A. $("#pre").siblings("p").css({"color": "red"});
B. $(".pre").siblings("p").css({"color": "red"});
C. $("pre").siblings(".p").css({"color": "red"});
D. $("pre").siblings("p").css({"color": "red"});

Answer: D) $("pre").siblings("p").css({"color": "red"});

Explanation:
The correct jQuery statement to change the color of all <p> elements which are sibling elements
of <pre> is:

$("pre").siblings("p").css({"color": "red"});

Discuss this Question

97. Which jQuery method is used to get the next sibling element of the selected element?

A. sibling()
B. nextSibling()
C. next()
D. siblings()

Answer: C) next()

4
Explanation:

9
21
jQuery method next() is used to get the next sibling element of the selected element.

59
07 Discuss this Question
80
.in

98. Which jQuery method is used to get the all next sibling element of the selected element?
ys

A. siblingAll()
ra

B. nextSiblingAll()
ar

C. nextAll()
D. siblingsAll()
ith
w

Answer: C) nextAll()
de

Explanation:
co

jQuery method nextAll() is used to get the all next sibling element of the selected element.

Discuss this Question

99. Let suppose there are multiple <h3> elements in an HTML document, which is the correct
jQuery statement to get the first <h3> element?

A. $("h3").first();
B. $("h3").parent();
C. $("h3").firstParent();
D. $("h3").top();

Answer: A) $("h3").first();
Explanation:

The correct jQuery statement to get the first <h3> element is:

$("h3").first();

Discuss this Question

100. Let suppose there are multiple <h3> elements in an HTML document, which is the correct
jQuery statement to get the last <h3> element?

A. $("h3").last();
B. $("h3").children();
C. $("h3").lastChild();
D. $("h3").down();

4
Answer: A) $("h3").last();

9
21
Explanation:

The correct jQuery statement to get the last <h3> element is:
59
07
80

$("h3").last();
.in
ys
ra
ar
ith
w
de
co
https://www.youtube.com/@codewitharrays

https://www.instagram.com/codewitharrays/

https://t.me/codewitharrays Group Link: https://t.me/ccee2025notes

+91 8007592194 +91 9284926333

[email protected]

https://codewitharrays.in/project

You might also like