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