SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Jquery Commands
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Allows you to select a grouping of elements
if ( $('#myDiv').length )
class selector
browser
$("#some\.id") instead of $("#some.id")
2. Show item if it exists but do nothing (no errors)
$( )
transparent
viewport
John Resig
dot
$("img#dog").fadeIn(3000);
dollar sign
$('#myDivId').val("hello world");
http://www.jquery.com
opaque
slideUp
CSS
if ( $('#myDiv').is('.pretty') )
$("<selector>").<method>;
id selector
dot
production
selector
*
$('.myCssClass')
if not $('#myDiv').show();
html
JavaScript
if not $('#myDiv').show();
$("#some\.id") instead of $("#some.id")
$("#c").attr("checked","");
$('#myDivId')
concatenation
$("#x").attr("disabled","disabled");
developer
slideDown
<script></script>
$("#x").removeAttr("disabled");
node
1000
$
+
terminator
$(document).ready( function( ) {/* your code here */} );
class selector
slideToggle
interpreter
var isHidden = $('#myDiv').is(':hidden');
var myValue = $('#myDivId').val();
html
descendent selector
var isVisible = $('#myDiv').is(':visible');
code block
$("h1").hide();
if ( $('#myDiv').length )
$("#c").attr("checked", "checked");
HTML string
DOM (Document Object Model)
var myDivElement = $('#myDivId');
none
if ( $(this).hasClass("protected")
jQuery
Write Less
method
$("#myselect option:selected").text();
semicolon
milliseconds
browser
3. Enable an element
*
CSS
$("#x").removeAttr("disabled");
+
4. jQuery command to take an image with an id of 'dog' and fade it from transparent to opaque in 3 seconds.
$("#myselect option:selected").text();
$("img#dog").fadeIn(3000);
method
1000
5. Uncheck an input
$("#c").attr("checked","");
var isVisible = $('#myDiv').is(':visible');
*
selector
6. Get the text value of a selected option
var myDivElement = $('#myDivId');
$("#myselect option:selected").text();
opaque
jQuery
7. Re-write the following command with the jQuery shortcut: jQuery("h1").hide();
developer
John Resig
interpreter
$("h1").hide();
8. Select an item using id
id selector
var isVisible = $('#myDiv').is(':visible');
var myValue = $('#myDivId').val();
concatenation
if ( $(this).hasClass("protected")
if ( $('#myDiv').length )
JavaScript
+
$
Write Less
$("h1").hide();
dollar sign
slideUp
dot
opaque
milliseconds
class selector
$("#myselect option:selected").text();
html
*
production
$("<selector>").<method>;
DOM (Document Object Model)
html
slideToggle
HTML string
if ( $('#myDiv').is('.pretty') )
slideDown
John Resig
$("#some\.id") instead of $("#some.id")
var myDivElement = $('#myDivId');
$("img#dog").fadeIn(3000);
none
interpreter
dot
$('#myDivId')
semicolon
method
$("#c").attr("checked", "checked");
$("#x").removeAttr("disabled");
$(document).ready( function( ) {/* your code here */} );
CSS
selector
transparent
<script></script>
jQuery
$('#myDivId')
$("#x").attr("disabled","disabled");
$("#c").attr("checked","");
terminator
if not $('#myDiv').show();
browser
code block
http://www.jquery.com
1000
$('.myCssClass')
developer
node
var isHidden = $('#myDiv').is(':hidden');
$('#myDivId').val("hello world");
$( )
descendent selector
viewport
9. The ______ method says 'If it's up slide it down; if it's down slide it up.'
opaque
slideToggle
concatenation
var isHidden = $('#myDiv').is(':hidden');
10. Root of an html document
HTML string
DOM (Document Object Model)
none
html
11. A ______ is used by jQuery to locate and return an element from the web page
$("#x").attr("disabled","disabled");
$('.myCssClass')
selector
$( )
12. jQuery selects elements the same way ____ does
$("#c").attr("checked", "checked");
CSS
class selector
descendent selector
13. Two versions of jQuery available for download: production & ________
DOM (Document Object Model)
developer
JavaScript
$("#x").attr("disabled","disabled");
14. Name of the symbol that ends a jQuery statement
$("#c").attr("checked", "checked");
http://www.jquery.com
semicolon
terminator
15. Set the value of an element
if not $('#myDiv').show();
jQuery
$("#some\.id") instead of $("#some.id")
html
JavaScript
production
selector
opaque
id selector
node
semicolon
var myDivElement = $('#myDivId');
$
var isVisible = $('#myDiv').is(':visible');
$("#myselect option:selected").text();
code block
html
terminator
+
milliseconds
if ( $('#myDiv').length )
$("#x").removeAttr("disabled");
none
if ( $('#myDiv').is('.pretty') )
var myValue = $('#myDivId').val();
<script></script>
developer
slideUp
class selector
$("#x").attr("disabled","disabled");
$("#c").attr("checked","");
1000
Write Less
$('#myDivId').val("hello world");
dot
browser
$(document).ready( function( ) {/* your code here */} );
CSS
viewport
dollar sign
DOM (Document Object Model)
method
concatenation
descendent selector
if ( $(this).hasClass("protected")
transparent
var isHidden = $('#myDiv').is(':hidden');
$('#myDivId').val("hello world");
$( )
$('#myDivId')
$('.myCssClass')
HTML string
$("#c").attr("checked", "checked");
$("<selector>").<method>;
$("img#dog").fadeIn(3000);
slideToggle
slideDown
interpreter
John Resig
http://www.jquery.com
*
$("h1").hide();
dot
16. Test whether an element has a particular class
CSS
var isHidden = $('#myDiv').is(':hidden');
$("<selector>").<method>;
node
$("#x").attr("disabled","disabled");
$('.myCssClass')
var myValue = $('#myDivId').val();
<script></script>
developer
concatenation
$('#myDivId')
method
John Resig
$("img#dog").fadeIn(3000);
$("#c").attr("checked","");
dot
$(document).ready( function( ) {/* your code here */} );
$("#myselect option:selected").text();
DOM (Document Object Model)
selector
jQuery
transparent
$("h1").hide();
html
*
$('#myDivId').val("hello world");
if not $('#myDiv').show();
id selector
viewport
semicolon
code block
slideToggle
HTML string
if ( $(this).hasClass("protected")
descendent selector
var myDivElement = $('#myDivId');
JavaScript
dot
html
if ( $('#myDiv').is('.pretty') )
slideDown
$
$("#c").attr("checked", "checked");
slideUp
none
http://www.jquery.com
1000
production
class selector
browser
if ( $('#myDiv').length )
$("#x").removeAttr("disabled");
var isVisible = $('#myDiv').is(':visible');
$("#some\.id") instead of $("#some.id")
milliseconds
$( )
terminator
dollar sign
+
Write Less
if ( $('#myDiv').is('.pretty') )
interpreter
opaque
17. Given: $("div p").hide(); Here the selector is an example of a _________; the parent is on the left and child is on the right
descendent selector
1000
if ( $(this).hasClass("protected")
slideUp
18. Determine the state of a toggled element
HTML string
html
dot
var isVisible = $('#myDiv').is(':visible');
interpreter
*
http://www.jquery.com
if ( $(this).hasClass("protected")
$("img#dog").fadeIn(3000);
slideToggle
node
$('#myDivId').val("hello world");
+
$("#some\.id") instead of $("#some.id")
class selector
id selector
<script></script>
method
viewport
none
var myDivElement = $('#myDivId');
slideUp
var myValue = $('#myDivId').val();
opaque
$('#myDivId')
JavaScript
$( )
browser
$('.myCssClass')
html
$("h1").hide();
concatenation
$(document).ready( function( ) {/* your code here */} );
code block
selector
$("#x").removeAttr("disabled");
descendent selector
slideDown
John Resig
production
if ( $('#myDiv').length )
jQuery
dot
CSS
$("#c").attr("checked","");
$("<selector>").<method>;
$
transparent
$("#x").attr("disabled","disabled");
terminator
if not $('#myDiv').show();
semicolon
milliseconds
dollar sign
DOM (Document Object Model)
if ( $('#myDiv').is('.pretty') )
var isHidden = $('#myDiv').is(':hidden');
$("#c").attr("checked", "checked");
developer
$("#myselect option:selected").text();
var isHidden = $('#myDiv').is(':hidden');
Write Less
1000
19. Unit of time measure in jQuery commands requiring a time value
browser
interpreter
milliseconds
slideUp
20. URL for obtaining jQuery
$("#some\.id") instead of $("#some.id")
$("img#dog").fadeIn(3000);
http://www.jquery.com
developer
21. This is the jQuery object. $ ("document").ready(function () { Your Code }); This is where all of jQuery's functionality is accessed from.
$
$( )
if not $('#myDiv').show();
id selector
22. A(n) ___ _____ is used to identify a single unique element on a page.
method
browser
<script></script>
id selector
23. Use a _____ to test that your jQuery scripts are working.
var isHidden = $('#myDiv').is(':hidden');
browser
$('#myDivId').val("hello world");
+
24. Get the value of an element
none
interpreter
semicolon
$("#myselect option:selected").text();
slideToggle
class selector
$("#x").removeAttr("disabled");
$( )
$("#x").attr("disabled","disabled");
if ( $('#myDiv').length )
$
JavaScript
browser
if ( $(this).hasClass("protected")
dollar sign
viewport
$('#myDivId')
method
$("#c").attr("checked","");
var myDivElement = $('#myDivId');
var myValue = $('#myDivId').val();
production
HTML string
dot
$("h1").hide();
$('.myCssClass')
transparent
node
<script></script>
1000
$("<selector>").<method>;
*
id selector
Write Less
$("img#dog").fadeIn(3000);
opaque
developer
+
terminator
slideUp
slideDown
if ( $('#myDiv').is('.pretty') )
concatenation
DOM (Document Object Model)
if not $('#myDiv').show();
html
html
var isHidden = $('#myDiv').is(':hidden');
dot
jQuery
John Resig
var myValue = $('#myDivId').val();
CSS
milliseconds
descendent selector
$("#c").attr("checked", "checked");
$(document).ready( function( ) {/* your code here */} );
$("#some\.id") instead of $("#some.id")
http://www.jquery.com
var isVisible = $('#myDiv').is(':visible');
$('#myDivId').val("hello world");
code block
selector
25. Disable an element
if ( $(this).hasClass("protected")
$("#some\.id") instead of $("#some.id")
$("#x").attr("disabled","disabled");
$("h1").hide();
26. Name of the symbol used for the jQuery shortcut
HTML string
selector
if ( $(this).hasClass("protected")
dollar sign
27. Number of milliseconds in a second
1000
var isHidden = $('#myDiv').is(':hidden');
Write Less
descendent selector
28. HTML tag pair that delimits a jQuery code block
<script></script>
interpreter
$('#myDivId')
$("#c").attr("checked", "checked");
29. Test whether an element exists
John Resig
dot
developer
node
viewport
$('#myDivId')
method
$
browser
$("#some\.id") instead of $("#some.id")
concatenation
$("img#dog").fadeIn(3000);
html
slideDown
$('#myDivId').val("hello world");
<script></script>
html
$(document).ready( function( ) {/* your code here */} );
id selector
var isHidden = $('#myDiv').is(':hidden');
if ( $('#myDiv').length )
Write Less
production
JavaScript
$( )
var myValue = $('#myDivId').val();
slideUp
jQuery
DOM (Document Object Model)
HTML string
CSS
$('.myCssClass')
dollar sign
if ( $('#myDiv').is('.pretty') )
interpreter
var isVisible = $('#myDiv').is(':visible');
descendent selector
transparent
if not $('#myDiv').show();
semicolon
$("#x").removeAttr("disabled");
*
none
selector
$("#c").attr("checked","");
code block
$("#myselect option:selected").text();
var myDivElement = $('#myDivId');
opaque
if ( $('#myDiv').length )
class selector
http://www.jquery.com
milliseconds
if ( $(this).hasClass("protected")
$("h1").hide();
+
$("#c").attr("checked", "checked");
slideToggle
terminator
$("<selector>").<method>;
1000
dot
$("#x").attr("disabled","disabled");
30. Each part of the DOM is called a ________.
opaque
*
node
dollar sign
31. JavaScript library specialized for complex interactivity and rich visual effects
$( )
John Resig
$("#myselect option:selected").text();
jQuery
32. The ______ is the main window of the browser.
viewport
CSS
$( )
transparent
33. You know you are dealing with a _____ when you see a set of parenthesis after a keyword
method
if not $('#myDiv').show();
slideUp
Write Less
34. Name of the character used to separate a jQuery selector from a jQuery method
<script></script>
browser
dot
method
35. 3 types of things that can go into the jQuery function: $( ) - CSS Selector - ________ - and JavaScript object
selector
$("#myselect option:selected").text();
http://www.jquery.com
HTML string
36. Concatenation symbol in JavaScript
opaque
+
http://www.jquery.com
$("#c").attr("checked","");
37. One of jQuery's main strengths is that it allows you to work with the ____ without having to know everything about it.
jQuery
DOM (Document Object Model)
var myDivElement = $('#myDivId');
if ( $('#myDiv').is('.pretty') )
38. Stuff between { } is often called a ______
code block
$('.myCssClass')
slideToggle
node
39. The _____ method changes the height property of an element from zero to whatever it's set to in the CSS style.
dot
JavaScript
slideDown
method
40. Check an input
JavaScript
developer
$("#c").attr("checked", "checked");
if ( $(this).hasClass("protected")
41. Select an item using class
42. Test whether an element has a particular class
$('#myDivId')
transparent
node
if ( $(this).hasClass("protected")
43. The _____ method changes the height property of an element until it is zero and then hides the element.
$("#some\.id") instead of $("#some.id")
slideUp
var isHidden = $('#myDiv').is(':hidden');
$("<selector>").<method>;
44. Syntax for a common jQuery code block that's intended to run when a web page is fully loaded
developer
var myValue = $('#myDivId').val();
id selector
$(document).ready( function( ) {/* your code here */} );
45. Another word for visible
opaque
$('#myDivId').val("hello world");
id selector
$("#x").attr("disabled","disabled");
46. The semicolon following a jQuery statement is known as a ___________
terminator
production
browser
$("#myselect option:selected").text();
47. The process of adding or 'gluing' various kinds of data together often in a message
terminator
viewport
code block
concatenation
48. jQuery is written in _____________
milliseconds
JavaScript
browser
production
49. Basic jQuery syntax (using shortcut)
$("<selector>").<method>;
transparent
semicolon
$('.myCssClass')
50. A CSS setting that makes sure an element won't show when the page loads: display:______;
DOM (Document Object Model)
milliseconds
none
HTML string