Who Said It: Merrick Garland or Judy Garland?
Mother Jones
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd”>
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.) (function($)
function make_default_how_you_did_html(nCorrect, nQuestions)
var answersWord = nCorrect === 1 ? ‘answer’ : ‘answers’;
return ‘You got ‘ + nCorrect + ‘ ‘ +
‘correct ‘ + answersWord + ‘ out of ‘ + nQuestions + ‘ questions’;
function make_default_how_you_did_htmls(nQuestions)
var ret = [];
for (var i = 0; i <= nQuestions; i++)
ret.push(make_default_how_you_did_html(i, nQuestions));
return ret;
}
$.quiz = function(quiz_data, results_data, options)
var container_elem;
var self;
var cover;
var cheater_answer_tracking = [];
var answer_tracking = [];
var how_you_did_element;
var quiz =
defaulting_behavior_on : true,
defaulting_flag : ‘!default’,
container : ‘quiz_container’,
not_finished_html : undefined,
cheating : false,
possible_display_elements : this.name) return ”;
return $(‘<div class=”‘ +
this.name +
‘” style=”background-image: url(” +
slidethis.name +
”); height: 100%; width: 100%;position:absolute;z-index: -1″>’
);
}
},
name : ‘topimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return $(
”
);
}
},
name : ‘topvideoembed’,
finder: function(container)
return container.find(‘.’ + this.name);
,
needs_aspect_ratio : true,
create_element : function(slide)
//check aspect ratio
if (!slide.topvideoembedaspectratio) return ”;
return $(” +
slidethis.name + ”
);
}
},
name : ‘title’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return $(‘
‘ +
slidethis.name + ”
);
}
},
name : ‘middleimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return $(
”
);
}
},
name : ‘middlevideoembed’,
needs_aspect_ratio : true,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
//check aspect ratio
if (!slide.middlevideoembedaspectratio) return ”;
return $(” +
slidethis.name + ”
);
}
},
name : ‘subhed’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return $(” +
slidethis.name +
”
);
}
},
name : ‘text’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return $(” +
slidethis.name +
”
);
}
},
name : ‘bottomimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.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 $(” +
slidethis.name + ”
);
}
}
],
init : function(quiz_data, results_data, options)
self = this;
if (options)
for ( var option in options )
selfoption = optionsoption;
}
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_dataquestion_index.possible_answersanswer_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_trackingquestion_index = was_correct;
if ( typeof(answer_trackingquestion_index) === ‘undefined’ )
answer_trackingquestion_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_dataquestion_index, question_index, self.quiz_dataquestion_index.possible_answersanswer_index);
// track that this was selected last
self.quiz_dataquestion_index.previously_selected = self.quiz_dataquestion_index.possible_answersanswer_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_elementsi – 1.finder(container).length )
self.possible_display_elementsi – 1.finder(container)
.after( self.possible_display_elementsplace_in_display_elements.create_element(slide) );
return;
}
container.prepend(
self.possible_display_elementsplace_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
var quiz = jQuery(‘#quiz_container’).quiz(’18Qdrd90EWhbn9NXf_gg1Fpj-otdc57unGzoAHqKuP_Q’);
Link to article: