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