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