This week President Barack Obama nominated DC Circuit Court Chief Judge Merrick Garland to replace Antonin Scalia on the Supreme Court. Garland is a highly respected centrist jurist with decades of high-level experience…and he shares a name with Wizard of Oz starlet Judy Garland! So, how well do you know the man who could become Obama’s third appointee to the nation’s highest court? Find out in our quiz!
(H/t to SCOTUSblog for its excellent rundown of Merrick’s judicial history.)
‘
);
}
},
{
name : ‘bottomimage’,
finder: function(container) {
return container.find(‘.’ + this.name);
},
create_element : function(slide) {
if (!slide[this.name]) {return ”;}
return $(‘‘
);
}
},
{
name : ‘bottomvideoembed’,
needs_aspect_ratio : true,
finder: function(container) {
return container.find(‘.’ + this.name);
},
create_element : function(slide) {
//check aspect ratio
if (!slide.bottomvideoembedaspectratio) {return ”;}
return $(‘
‘
);
}
}
],
init : function(quiz_data, results_data, options) {
self = this;
if (options) {
for ( var option in options ) {
self[option] = options[option];
}
}
if (typeof(quiz_data) === ‘string’) {
// is a google spreadsheet.
// Will call init_data in a callback
self.load_from_google_spreadsheet(quiz_data);
} else {
if (!results_data) {
results_data = make_default_how_you_did_htmls(quiz_data.length);
}
self.init_data(quiz_data, results_data);
}
return self;
},
init_data: function(quiz_data, results_data) {
self.quiz_data = quiz_data;
self.results_data = results_data;
self.calculate_aspectratios(quiz_data);
self.create_cover();
for ( var i = 0; i ‘);
cover.append(how_you_did_element);
},
load_from_google_spreadsheet: function(spreadsheet_id) {
Tabletop.init({
key: spreadsheet_id,
prettyColumnNames: false,
callback: function(data) {
var quiz_data = self.make_quiz_data_from_spreadsheet_data(data);
var results_data = self.make_results_data_from_spreadsheet_data(data, quiz_data);
self.init_data(quiz_data, results_data);
}
});
},
calculate_aspectratios: function(data) {
for (var i = 0; i ‘
);
question_container.append( self.build_question_element_from_row(question_data) );
question_container.append( self.build_possible_answer_elements_from_row(question_data, question_index) );
container_elem.append(question_container);
},
build_question_element_from_row: function(row) {
var question_container = $(‘
‘);
for (var i = 0; i ‘);
function bindClick(question_index, answer_index, possible_answer) {
possible_answer.bind(‘click’, function() {
// was it the right answer?
var was_correct = self.quiz_data[question_index].possible_answers[answer_index].correct;
// Add correct classes to possible answers
answers_container.find(‘.selected’).removeClass(‘selected’);
$(this).addClass(‘selected’);
$(this).removeClass(‘possible_answer’);
answers_container
.find(‘.answer_’ + answer_index)
.addClass(
was_correct ? ‘correct_answer’ : ‘wrong_answer’
);
//track how many you got right the first time
cheater_answer_tracking[question_index] = was_correct;
if ( typeof(answer_tracking[question_index]) === ‘undefined’ ) {
answer_tracking[question_index] = was_correct;
cover.find(‘.question_’ + question_index).addClass(
‘first_guess_’ +
(was_correct ? ‘right’ : ‘wrong’)
);
}
self.update_how_you_did_element();
//show new slide
self.display_answer(self.quiz_data[question_index], question_index, self.quiz_data[question_index].possible_answers[answer_index]);
// track that this was selected last
self.quiz_data[question_index].previously_selected = self.quiz_data[question_index].possible_answers[answer_index];
});
}
for (var i = 0; i ‘ +
answer_data.answer +
”);
bindClick(question_index, i, possible_answer);
answers_container.append(possible_answer);
this.note_answer_images(answer_data);
}
return answers_container;
},
answer_images : {},
preload_answer_images: function() {
for (var url in this.answer_images) {
var img=new Image();
img.src=url;
}
},
note_answer_images: function(answer_data) {
var image_elements = [‘backgroundimage’, ‘topimage’, ‘bottomimage’];
for (var i = 0; i 0; i– ) {
if (self.possible_display_elements[i – 1].finder(container).length ) {
self.possible_display_elements[i – 1].finder(container)
.after( self.possible_display_elements[place_in_display_elements].create_element(slide) );
return;
}
}
container.prepend(
self.possible_display_elements[place_in_display_elements].create_element(slide)
);
},
display_answer : function(question, question_index, answer) {
var displayed_slide = question.previously_selected ?
question.previously_selected :
question.question;
var slide = container_elem.find(‘.question_’ + question_index + ‘ .question’);
slide.addClass(‘revealed_answer’);
for (var i = 0; i ‘);
cover.append(container_elem);
container_elem.addClass(‘quiz_container’);
container_elem.css(‘padding’, ‘0px’);
},
update_how_you_did_element: function() {
var right_answers = 0;
var user_answers = self.cheating ? cheater_answer_tracking : answer_tracking;
var unfinished = false;
for (var i = 0; i