These jQuery multiple-choice questions and their answers will help you strengthen your grip on the subject of jQuery. You can prepare for an upcoming exam or job interview with these jQuery MCQs.
So scroll down and start answering.
A. Secret
B. Private
C. Open source
D. Proprietary
A. First the height animates, then the width animates.
B. First the width animates, then the height animates.
C. Both the width and height animates at the same time.
A. $('div').handler('click',function {alert(1);});
B. $('div').bind('click',function {alert(1);});
C. $('div').call('click',function {alert(1);});
D. $('div').event('click',function {alert(1);});
A. after everything has loaded
B. after everything except other scripts are loaded
C. after all other javascript has been read and executed
D. before anything has loaded
E. after the DOM has loaded, but prior to anything else loading
A. Select only elements in a disabled state
B. Create a new element with the state set to disabled
C. None of the above
D. Disable any elements currently set to an enabled state
A. visibility: hidden;
B. display: none;
C. height: 0;
D. opacity: 0;
A. jQuery object
B. HTML text
C. result set
D. recordset
A. object
B. here
C. this
D. medium
E. that
A. No difference. width() is a shorthand alias for outerWidth()
B. Only difference is .width() returns a number & outerWidth() returns a string.
C. width() returns the computed width of the element while outerWidth() returns the width plus all the margins and paddings.
A. True
B. False
A. Name
B. element
C. Attribute
D. element's ID
A. JavaScript
B. C++
C. Java
D. PHP
A. PHP
B. JavaScript
C. CSS
D. Java
A. $(':name')
B. $('#name')
C. $('.name')
A. $(script src)="jQuery.js"(/script)
B. <script src="jQuery.js"></script>
C. $script src="jQuery.js"
D. $(script) src="jQuery.js")
A. Server Scripting
B. Client Scripting
A. $('_name')
B. $('#name')
C. $('.name')
A. Allows you to select an array in the node list.
B. Allows the content to be stopped at some point.
C. Allows you to select HTML elements (or groups of elements) by element name, attribute name or by content.
D. Allows selection of libraries.
A. toggle()
B. show()
C. fadeIn()
D. alias()
A. Changes the background color of the element with class 'effect' to #fff within 1 second.
B. Changes the background color of the element with id 'effect' to #fff within 1 second.
A. No
B. Yes
A. display(none)
B. hidden()
C. hide()
D. hide(display)
A. Takes the name of an attribute and duplicates it.
B. Takes the name of an attribute on your page and gives the value of that attribute.
C. Takes the name of an attribute on the page and makes it animate.
D. Takes the element and duplicates it.
A. ${."myID"}
B. ${"#myID"}
C. #{".myID"}
D. $("#myID")
A. #
B. *
C. &
D. ?
A. True
B. False
A. java();
B. Function();
C. function();
D. operator();
E. jQuery();
A. toggle
B. reverse
C. alternate
D. flip
E. switch
A. fadeIn('three')
B. fadeIn(3000)
C. fadeIn('3 seconds')
D. fadeIn('3 sec')
E. fadeIn(3)
A. $('p').css('color', 'red');
B. $('p').css('color: red;');
C. $('p').css('color: red');
A. $('#myClass')
B. #(".myClass")
C. $(".myClass")
D. $("#myClass")
A. $("book").fadeOut{}
B. jQuery("book").fadeOut{}
C. $(#book).fadeOut();
D. $("#book").fadeOut();
A. $.stripspace( )
B. jQuery does not provide such function.
C. $.strip( )
D. $.trim( )
A. $('#foo').display('show');
B. $('#foo').style('show');
C. $('#foo').showElement();
D. $('#foo').show();
A. use .hasThis()
B. use.class()
C. use .isClass()
D. use .hasClass()
E. use .getClass()
A. .copy()
B. .clone()
C. .duplicate()
D. .repeat()
A. client browser
B. client server
C. host server
D. host browser
A. Overcome cross-browser issues
B. Rapid web development
C. Simplify JavaScript coding
D. All of these
A. There is no find() function
B. There is no children() function
C. Both do similar tasks
D. The .find() and .children() methods are similar, except that the latter only travels a single level down the DOM tree.
A. classSwitch()
B. switch()
C. switchClass()
D. toggleClass()
A. Remove Whitespace from beginning & ending of string
B. trim() is not a valid Jquery function
C. Remove Whitespace from beginning of string
D. Remove Whitespace from end of string
A. True
B. False
A. Java
B. CSS
C. HTML
D. DOM
A. $("div#mydiv").never("
Paragraph
");B. $("
Paragraph
").appendTo("div#mydiv");C. $("div#mydiv").before("
Paragraph
");D. $("
Paragraph
").new("div#mydiv");A. $(#box).fadeOut().fadeIn()
B. $("#box").fadeOut().fadeIn();
C. $(“box”).fadeOut().fadeIn()
D. $(<#box>).fadeOut().fadeIn();
A. .load()
B. .show()
C. .ready()
D. .hide()
A. $("div").height(100)
B. $("div").height="100"
C. $("div").height.pos=100
D. $("div").height=("100")
A. $("#someID").css("color","red");
B. $("#someID"))((.style("color","red");
C. $.css("color:red");
D. $("#someID").css("color:red");
A. div:left
B. li:last
C. p:first
D. tr:even
E. tr:odd
A. $('first.span.white')
B. $('white;span;first')
C. $('span.white:first')
D. $('span; white: first')