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