Quiz Study Guide

Quiz #1: Javascript (10%)

The quiz will be multiple choice and short answer. Be able to identify the proper usage and syntax for the following:

statements
variables
data types: strings, numbers, booleans, arrays
basic operators and “shortcut” operators 
comparison operators 
arrays
adding javascript to a page
(internal and external methods)
javascript commenting 
objects / methods / properties
functions 
for loops
while loops
conditional statements
scope


Quiz #2: jQuery  (10%)

The quiz will be multiple choice and will cover the three chapters on jQuery. Be able to identify the following:

$(document).ready(function(){
 // do stuff
});

jQuery syntax: 
$(selector).action()

jQuery selectors:  
$(“p”) selects all <p> elements.

jQuery events:
keydown()
keypress()
keyup()
click()
dblclick()
hover()

jQuery effects:
hide()
show()
animate()
fadeIn()
fadeOut()
toggle()
slideToggle()
slideUp()
slideDown()
stop()
delay()

jQuery anonymous functions (connected to event)
$(‘button’).click(function() {
// do something
});

jQuery callback functions: (triggers after event)
$(selector).hide(speed,callback)

jQuery html /css methods: 
.html(),
.text(),
.remove(),
.empty(),
.css(),
.append(),
.prepend(),
.before(),
.after(),
.addClass(),
.removeClass(),

$(selector).css(property, value)  –  sets  CSS single property and value

$(selector).css({
property : value,
property : value,
property : value
})
-sets multiple CSS properties and values (object literal)

Object Literals, for example the following adds css property/value pairs:

$(document).ready(function(){
 $("div").css({
 'background-color':'#FFFF00',
 'color':'#FF0000', 
 'font-family':'Arial',
 'font-size':'18pt'})
 });

Leave a Reply