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. Get the value of an element
var myValue = $('#myDivId').val();
descendent selector
opaque
if ( $('#myDiv').length )
if ( $(this).hasClass("protected")
dollar sign
$( )
$("<selector>").<method>;
browser
production
$('.myCssClass')
http://www.jquery.com
$("#some\.id") instead of $("#some.id")
slideToggle
interpreter
method
id selector
viewport
$(document).ready( function( ) {/* your code here */} );
var isHidden = $('#myDiv').is(':hidden');
slideDown
var myValue = $('#myDivId').val();
var myDivElement = $('#myDivId');
dot
semicolon
if not $('#myDiv').show();
$('#myDivId').val("hello world");
1000
Write Less
John Resig
JavaScript
if ( $('#myDiv').is('.pretty') )
var isVisible = $('#myDiv').is(':visible');
transparent
$('#myDivId')
html
terminator
CSS
developer
<script></script>
$("#x").attr("disabled","disabled");
$
code block
dot
$("h1").hide();
$("#c").attr("checked","");
HTML string
DOM (Document Object Model)
jQuery
html
class selector
$("#myselect option:selected").text();
selector
slideUp
$("img#dog").fadeIn(3000);
node
$("#c").attr("checked", "checked");
milliseconds
+
*
$("#x").removeAttr("disabled");
none
concatenation
2. Assign a selected element to a javascript variable
concatenation
class selector
production
id selector
code block
selector
<script></script>
http://www.jquery.com
var myDivElement = $('#myDivId');
$("#c").attr("checked","");
node
$('.myCssClass')
opaque
viewport
$( )
JavaScript
dot
milliseconds
if ( $('#myDiv').is('.pretty') )
$('#myDivId').val("hello world");
semicolon
slideDown
$("#c").attr("checked", "checked");
*
$
slideToggle
transparent
John Resig
Write Less
dollar sign
var myValue = $('#myDivId').val();
$("<selector>").<method>;
$("#x").removeAttr("disabled");
$(document).ready( function( ) {/* your code here */} );
if not $('#myDiv').show();
DOM (Document Object Model)
browser
jQuery
$("#myselect option:selected").text();
$("#some\.id") instead of $("#some.id")
html
$('#myDivId')
$("img#dog").fadeIn(3000);
HTML string
dot
$("h1").hide();
developer
interpreter
+
method
html
CSS
slideUp
terminator
if ( $('#myDiv').length )
if ( $(this).hasClass("protected")
1000
var isVisible = $('#myDiv').is(':visible');
var isHidden = $('#myDiv').is(':hidden');
var myDivElement = $('#myDivId');
$("#x").attr("disabled","disabled");
descendent selector
none
3. One of jQuery's main strengths is that it allows you to work with the ____ without having to know everything about it.
Write Less
var isHidden = $('#myDiv').is(':hidden');
DOM (Document Object Model)
$('#myDivId')
4. JavaScript library specialized for complex interactivity and rich visual effects
$("<selector>").<method>;
jQuery
slideDown
1000
5. A(n) ___ _____ is used to identify a single unique element on a page.
<script></script>
1000
id selector
terminator
6. Each part of the DOM is called a ________.
dot
$("h1").hide();
node
slideDown
7. Name of the symbol used for the jQuery shortcut
dot
dollar sign
dot
var isVisible = $('#myDiv').is(':visible');
8. The ______ method says 'If it's up slide it down; if it's down slide it up.'
slideToggle
var myValue = $('#myDivId').val();
dot
selector
9. Syntax for a common jQuery code block that's intended to run when a web page is fully loaded
Write Less
node
$(document).ready( function( ) {/* your code here */} );
$( )
10. Wildcard selector in jQuery (selects all elements)
*
concatenation
jQuery
html
11. HTML tag pair that delimits a jQuery code block
<script></script>
production
developer
id selector
12. The semicolon following a jQuery statement is known as a ___________
+
$("#c").attr("checked", "checked");
none
terminator
13. The process of adding or 'gluing' various kinds of data together often in a message
dot
$("h1").hide();
concatenation
1000
14. Determine the state of a toggled element
code block
browser
$("#some\.id") instead of $("#some.id")
slideUp
HTML string
if not $('#myDiv').show();
semicolon
terminator
html
html
http://www.jquery.com
milliseconds
concatenation
none
$("#myselect option:selected").text();
selector
$("#x").removeAttr("disabled");
var isVisible = $('#myDiv').is(':visible');
$("#x").attr("disabled","disabled");
if ( $(this).hasClass("protected")
production
transparent
+
dot
viewport
$(document).ready( function( ) {/* your code here */} );
var myDivElement = $('#myDivId');
opaque
dot
$('#myDivId')
interpreter
$("h1").hide();
slideDown
<script></script>
$('#myDivId').val("hello world");
descendent selector
slideToggle
$("#c").attr("checked","");
id selector
DOM (Document Object Model)
$("<selector>").<method>;
if ( $('#myDiv').length )
$( )
var isVisible = $('#myDiv').is(':visible');
node
JavaScript
$("img#dog").fadeIn(3000);
method
*
var myValue = $('#myDivId').val();
class selector
if ( $('#myDiv').is('.pretty') )
$('.myCssClass')
CSS
var isHidden = $('#myDiv').is(':hidden');
jQuery
$("#c").attr("checked", "checked");
developer
1000
Write Less
$
John Resig
dollar sign
15. Show item if it exists but do nothing (no errors)
HTML string
if ( $('#myDiv').is('.pretty') )
selector
JavaScript
$("<selector>").<method>;
id selector
transparent
dollar sign
slideUp
class selector
$('.myCssClass')
milliseconds
$(document).ready( function( ) {/* your code here */} );
developer
browser
if ( $('#myDiv').length )
if not $('#myDiv').show();
$("#x").removeAttr("disabled");
slideDown
slideToggle
method
*
<script></script>
1000
$("#some\.id") instead of $("#some.id")
$("#myselect option:selected").text();
semicolon
dot
html
$("#x").attr("disabled","disabled");
DOM (Document Object Model)
terminator
production
opaque
interpreter
dot
$("#c").attr("checked","");
viewport
var myDivElement = $('#myDivId');
none
var myValue = $('#myDivId').val();
+
CSS
$('#myDivId')
$('#myDivId').val("hello world");
Write Less
var isVisible = $('#myDiv').is(':visible');
$("#c").attr("checked", "checked");
jQuery
$
node
$("img#dog").fadeIn(3000);
if not $('#myDiv').show();
var isHidden = $('#myDiv').is(':hidden');
$("h1").hide();
$( )
concatenation
John Resig
html
code block
if ( $(this).hasClass("protected")
http://www.jquery.com
descendent selector
16. This is the jQuery object. $ ("document").ready(function () { Your Code }); This is where all of jQuery's functionality is accessed from.
var isVisible = $('#myDiv').is(':visible');
$
node
$("h1").hide();
17. The JavaScript ______ translates directions you give it into different actions on the web page
terminator
interpreter
var isVisible = $('#myDiv').is(':visible');
HTML string
18. This kind of file builds the structure of the web page
html
interpreter
var isVisible = $('#myDiv').is(':visible');
$( )
19. 3 types of things that can go into the jQuery function: $( ) - CSS Selector - ________ - and JavaScript object
HTML string
none
method
$("#c").attr("checked","");
20. jQuery motto: _____. Do More.
dot
$("#c").attr("checked","");
$("<selector>").<method>;
Write Less
21. Select an element that has special CSS characters in its ID like '.'
$("#some\.id") instead of $("#some.id")
$("#x").removeAttr("disabled");
var isVisible = $('#myDiv').is(':visible');
$(document).ready( function( ) {/* your code here */} );
22. Disable an element
CSS
$("img#dog").fadeIn(3000);
production
$("#x").attr("disabled","disabled");
23. Enable an element
terminator
DOM (Document Object Model)
$("#x").removeAttr("disabled");
concatenation
24. You know you are dealing with a _____ when you see a set of parenthesis after a keyword
$(document).ready( function( ) {/* your code here */} );
class selector
semicolon
method
25. Both CSS and jQuery use the ____ symbol to specify a class.
if ( $('#myDiv').length )
none
1000
dot
26. Determine the state of a toggled element
var myDivElement = $('#myDivId');
$("#some\.id") instead of $("#some.id")
CSS
code block
$(document).ready( function( ) {/* your code here */} );
$("#c").attr("checked", "checked");
html
concatenation
jQuery
$("#x").removeAttr("disabled");
$("#x").attr("disabled","disabled");
dot
none
<script></script>
$("img#dog").fadeIn(3000);
selector
node
JavaScript
semicolon
browser
$("h1").hide();
Write Less
opaque
$("<selector>").<method>;
production
developer
viewport
milliseconds
*
if ( $(this).hasClass("protected")
var isHidden = $('#myDiv').is(':hidden');
$("#c").attr("checked","");
$
interpreter
$( )
slideUp
slideToggle
dollar sign
if ( $('#myDiv').is('.pretty') )
HTML string
1000
DOM (Document Object Model)
var myValue = $('#myDivId').val();
if not $('#myDiv').show();
+
http://www.jquery.com
class selector
slideDown
if ( $('#myDiv').length )
John Resig
var isHidden = $('#myDiv').is(':hidden');
var isVisible = $('#myDiv').is(':visible');
transparent
$('#myDivId').val("hello world");
id selector
html
descendent selector
$("#myselect option:selected").text();
dot
$('.myCssClass')
terminator
method
$('#myDivId')
27. Allows you to select a grouping of elements
code block
slideToggle
dot
class selector
28. Given: $("div p").hide(); Here the selector is an example of a _________; the parent is on the left and child is on the right
http://www.jquery.com
$("#myselect option:selected").text();
dot
descendent selector
29. Use a _____ to test that your jQuery scripts are working.
browser
CSS
interpreter
none
30. Root of an html document
slideDown
html
$("#x").attr("disabled","disabled");
dollar sign
31. jQuery command to take an image with an id of 'dog' and fade it from transparent to opaque in 3 seconds.
$("img#dog").fadeIn(3000);
if not $('#myDiv').show();
$("#c").attr("checked","");
DOM (Document Object Model)
32. Check an input
dollar sign
none
id selector
$("#c").attr("checked", "checked");
33. Unit of time measure in jQuery commands requiring a time value
semicolon
$('#myDivId').val("hello world");
milliseconds
$("#x").attr("disabled","disabled");
34. Name of the character used to separate a jQuery selector from a jQuery method
developer
$(document).ready( function( ) {/* your code here */} );
dot
transparent
35. Name of the symbol that ends a jQuery statement
html
developer
method
semicolon
36. Stuff between { } is often called a ______
HTML string
code block
$("img#dog").fadeIn(3000);
if ( $('#myDiv').length )
37. Test whether an element exists
if ( $(this).hasClass("protected")
selector
$('#myDivId').val("hello world");
$("img#dog").fadeIn(3000);
none
$("#x").attr("disabled","disabled");
slideToggle
concatenation
opaque
semicolon
$('#myDivId')
var myValue = $('#myDivId').val();
$("#c").attr("checked","");
terminator
if ( $('#myDiv').is('.pretty') )
code block
$(document).ready( function( ) {/* your code here */} );
$("<selector>").<method>;
slideDown
if not $('#myDiv').show();
John Resig
interpreter
http://www.jquery.com
1000
$
id selector
$('.myCssClass')
*
var isHidden = $('#myDiv').is(':hidden');
milliseconds
developer
class selector
if ( $('#myDiv').length )
production
<script></script>
$("#x").removeAttr("disabled");
if ( $('#myDiv').length )
method
html
node
DOM (Document Object Model)
dollar sign
$("#c").attr("checked", "checked");
descendent selector
transparent
var isVisible = $('#myDiv').is(':visible');
$("#myselect option:selected").text();
viewport
html
+
dot
$( )
$("h1").hide();
var myDivElement = $('#myDivId');
browser
Write Less
jQuery
dot
JavaScript
slideUp
$("#some\.id") instead of $("#some.id")
HTML string
CSS
38. Another word for invisible
none
HTML string
transparent
CSS
39. Re-write the following command with the jQuery shortcut: jQuery("h1").hide();
$(document).ready( function( ) {/* your code here */} );
*
$("h1").hide();
dot
40. Get the text value of a selected option
$("#myselect option:selected").text();
$("h1").hide();
if ( $(this).hasClass("protected")
<script></script>
41. The _____ method changes the height property of an element from zero to whatever it's set to in the CSS style.
if ( $('#myDiv').is('.pretty') )
var myDivElement = $('#myDivId');
slideDown
viewport
42. Another word for visible
production
$("#c").attr("checked", "checked");
opaque
semicolon
43. Basic jQuery syntax (using shortcut)
http://www.jquery.com
$("<selector>").<method>;
$("#c").attr("checked", "checked");
viewport
44. Select an item using class
45. The _____ method changes the height property of an element until it is zero and then hides the element.
slideUp
dot
$("#c").attr("checked", "checked");
if ( $('#myDiv').length )
46. Concatenation symbol in JavaScript
CSS
developer
$("#c").attr("checked", "checked");
+
47. Uncheck an input
var myValue = $('#myDivId').val();
$('#myDivId')
$("#c").attr("checked","");
if ( $('#myDiv').length )
48. Shortcut for typing: jQuery( )
$("#x").removeAttr("disabled");
code block
$("#x").attr("disabled","disabled");
$( )
49. Number of milliseconds in a second
$("h1").hide();
JavaScript
$("#c").attr("checked", "checked");
1000
50. jQuery is written in _____________
JavaScript
developer
slideToggle
$("#x").removeAttr("disabled");