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
25
questions in
10 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. Set the value of an element
browser
html
id selector
if not $('#myDiv').show();
<script></script>
var myDivElement = $('#myDivId');
CSS
$( )
John Resig
if ( $('#myDiv').length )
$("<selector>").<method>;
Write Less
1000
jQuery
$("#some\.id") instead of $("#some.id")
production
$('.myCssClass')
+
html
var myValue = $('#myDivId').val();
descendent selector
dot
developer
slideDown
$(document).ready( function( ) {/* your code here */} );
interpreter
none
$("h1").hide();
$("#c").attr("checked", "checked");
$("#x").attr("disabled","disabled");
$("#c").attr("checked","");
$('#myDivId').val("hello world");
if ( $(this).hasClass("protected")
$("#x").removeAttr("disabled");
*
milliseconds
$("#myselect option:selected").text();
selector
transparent
DOM (Document Object Model)
dollar sign
code block
http://www.jquery.com
terminator
node
class selector
concatenation
$("img#dog").fadeIn(3000);
$
HTML string
$('#myDivId').val("hello world");
var isVisible = $('#myDiv').is(':visible');
semicolon
viewport
slideToggle
method
slideUp
JavaScript
var isHidden = $('#myDiv').is(':hidden');
dot
$('#myDivId')
opaque
if ( $('#myDiv').is('.pretty') )
2. The original creator of the jQuery library
var myValue = $('#myDivId').val();
John Resig
semicolon
$("h1").hide();
3. A CSS setting that makes sure an element won't show when the page loads: display:______;
none
$("#some\.id") instead of $("#some.id")
$('#myDivId').val("hello world");
descendent selector
4. Get the text value of a selected option
$("#myselect option:selected").text();
$("<selector>").<method>;
browser
milliseconds
5. 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);
production
Write Less
$("#x").removeAttr("disabled");
6. Shortcut for typing: jQuery( )
$("img#dog").fadeIn(3000);
$( )
production
id selector
7. You know you are dealing with a _____ when you see a set of parenthesis after a keyword
terminator
http://www.jquery.com
John Resig
method
8. A(n) ___ _____ is used to identify a single unique element on a page.
John Resig
id selector
*
slideUp
9. The ______ method says 'If it's up slide it down; if it's down slide it up.'
dot
var myDivElement = $('#myDivId');
slideToggle
$("<selector>").<method>;
10. jQuery is written in _____________
dot
$(document).ready( function( ) {/* your code here */} );
slideUp
JavaScript
11. This kind of file builds the structure of the web page
DOM (Document Object Model)
descendent selector
slideUp
html
12. Both CSS and jQuery use the ____ symbol to specify a class.
JavaScript
selector
$('#myDivId').val("hello world");
dot
13. Basic jQuery syntax (using shortcut)
$("<selector>").<method>;
John Resig
$("#myselect option:selected").text();
slideDown
14. Show item if it exists but do nothing (no errors)
transparent
JavaScript
concatenation
Write Less
$("#c").attr("checked","");
$("#myselect option:selected").text();
$("#c").attr("checked", "checked");
class selector
if not $('#myDiv').show();
interpreter
node
selector
html
$('#myDivId')
1000
html
production
id selector
semicolon
http://www.jquery.com
slideDown
slideUp
John Resig
if not $('#myDiv').show();
browser
var myDivElement = $('#myDivId');
dot
$("<selector>").<method>;
code block
dot
descendent selector
$('.myCssClass')
$("#some\.id") instead of $("#some.id")
$( )
var isHidden = $('#myDiv').is(':hidden');
slideToggle
milliseconds
if ( $('#myDiv').length )
<script></script>
dollar sign
opaque
var myValue = $('#myDivId').val();
HTML string
$
jQuery
$(document).ready( function( ) {/* your code here */} );
$("#x").attr("disabled","disabled");
+
if ( $('#myDiv').is('.pretty') )
terminator
none
$("#x").removeAttr("disabled");
var isVisible = $('#myDiv').is(':visible');
*
$("img#dog").fadeIn(3000);
method
$("h1").hide();
viewport
if ( $(this).hasClass("protected")
$('#myDivId').val("hello world");
DOM (Document Object Model)
developer
CSS
15. Disable an element
http://www.jquery.com
slideToggle
*
$("#x").attr("disabled","disabled");
16. Select an item using class
17. Root of an html document
var isHidden = $('#myDiv').is(':hidden');
html
slideUp
terminator
18. Select an item using id
slideDown
if ( $('#myDiv').is('.pretty') )
$
$(document).ready( function( ) {/* your code here */} );
transparent
var myValue = $('#myDivId').val();
$("#some\.id") instead of $("#some.id")
developer
$("#myselect option:selected").text();
$("#c").attr("checked","");
html
dot
$('#myDivId')
DOM (Document Object Model)
dot
slideToggle
$("img#dog").fadeIn(3000);
opaque
$("#x").removeAttr("disabled");
CSS
+
jQuery
1000
John Resig
$("#c").attr("checked", "checked");
html
selector
$("#x").attr("disabled","disabled");
viewport
milliseconds
method
id selector
concatenation
$( )
var isHidden = $('#myDiv').is(':hidden');
slideUp
$("<selector>").<method>;
*
browser
var isVisible = $('#myDiv').is(':visible');
if ( $(this).hasClass("protected")
if not $('#myDiv').show();
JavaScript
HTML string
$('#myDivId').val("hello world");
dollar sign
class selector
terminator
http://www.jquery.com
Write Less
$("h1").hide();
$('#myDivId')
if ( $('#myDiv').length )
$('.myCssClass')
code block
none
descendent selector
semicolon
node
production
var myDivElement = $('#myDivId');
<script></script>
interpreter
19. Select an element that has special CSS characters in its ID like '.'
$("#some\.id") instead of $("#some.id")
browser
slideDown
$("#x").removeAttr("disabled");
20. Each part of the DOM is called a ________.
node
if not $('#myDiv').show();
$( )
transparent
21. Assign a selected element to a javascript variable
if ( $('#myDiv').is('.pretty') )
$(document).ready( function( ) {/* your code here */} );
$("h1").hide();
if ( $('#myDiv').length )
John Resig
concatenation
if not $('#myDiv').show();
interpreter
browser
slideUp
$("#myselect option:selected").text();
dot
var myDivElement = $('#myDivId');
html
html
var myValue = $('#myDivId').val();
semicolon
Write Less
code block
dollar sign
var isHidden = $('#myDiv').is(':hidden');
descendent selector
transparent
HTML string
$('#myDivId').val("hello world");
class selector
$("<selector>").<method>;
$('.myCssClass')
+
production
$("#some\.id") instead of $("#some.id")
1000
var isVisible = $('#myDiv').is(':visible');
slideDown
developer
$("img#dog").fadeIn(3000);
slideToggle
http://www.jquery.com
DOM (Document Object Model)
$("#x").removeAttr("disabled");
$('#myDivId')
$( )
if ( $(this).hasClass("protected")
id selector
dot
terminator
viewport
none
$("#c").attr("checked","");
CSS
<script></script>
opaque
jQuery
*
$
selector
$("#x").attr("disabled","disabled");
milliseconds
node
JavaScript
var myDivElement = $('#myDivId');
$("#c").attr("checked", "checked");
method
22. The JavaScript ______ translates directions you give it into different actions on the web page
interpreter
+
developer
dollar sign
23. 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
semicolon
developer
http://www.jquery.com
24. Enable an element
$("#x").removeAttr("disabled");
dot
if ( $('#myDiv').length )
selector
25. Syntax for a common jQuery code block that's intended to run when a web page is fully loaded
$(document).ready( function( ) {/* your code here */} );
milliseconds
none
+