Tag Archives: addclass

Who Said It: Donald Sterling or Donald Trump?

Mother Jones

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd”>

var quiz = jQuery(‘#quiz_container’).quiz(‘0AuHOPshyxQGGdF9CMUVJeFM2UkJDb0txOUNxemZ6U3c’);
On Fox & Friends today, Donald Trump stood up for fellow aggrieved billionaire Republican Donald Sterling, claiming that the Los Angeles Clippers owner was “set up by a very, very bad girlfriend.” Sterling, of course, is under fire for the recently released audio recording in which he tells onetime girlfriend V. Stiviano to, among other things, stop associating publicly with black people, including Lakers great Magic Johnson. With sponsors rushing to drop the Clippers, it must be a great relief for Sterling to know that he’s got The Donald on his side.

Trump’s comments made us wonder, though: Could you tell the two Donalds apart by the wacky (and creepy) things they’ve said over the years? Try your luck with our Which Donald Is It? quiz below:

(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 < self.quiz_data.length; i++ )
self.append_question(i);

self.append_how_you_did_section();
self.update_how_you_did_element();
self.preload_answer_images();
},
append_how_you_did_section: function()
how_you_did_element = $(”);
cover.append(how_you_did_element);
,

load_from_google_spreadsheet: function(spreadsheet_id)
Tabletop.init(
key: spreadsheet_id,
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 < data.length; i++)
var row = datai;
for (var k = 0; k < row.possible_answers.length; k++)
var answer = row.possible_answersk;
self.find_aspectratio_for_each_type_of_video_embed(answer);

self.find_aspectratio_for_each_type_of_video_embed(row.question);
}
},

find_aspectratio_for_each_type_of_video_embed : function(slide)
for (var i = 0; i < self.possible_display_elements.length; i++ )
var display = self.possible_display_elementsi;
if ( display.needs_aspect_ratio && slidedisplay.name )
slidedisplay.name + ‘aspectratio’ =
self.find_aspectratio(slidedisplay.name);

}
},
find_aspectratio: function(videoembed)
var height = videoembed.match(/height=”d+”/);
if (!height
height = parseInt(height0.replace(/height=”/, ”).replace(/”/, ”), 10);

var width = videoembed.match(/width=”d+”/);
if (!width || !width0)
console.log(‘Your video embed code needs a width.’);
return ”;

width = parseInt(width0.replace(/width=”/, ”).replace(/”/, ”), 10);

return (height / width)*100;
},
pull_answer_value_from_spreadsheet : function(row, value, wrong_number, correct)
correct = correct ? ‘right’ : ‘wrong’;
if (rowcorrect + wrong_number + value && rowcorrect + wrong_number + value !== self.defaulting_flag)
return (rowcorrect + wrong_number + value);

if ((self.defaulting_behavior_on && rowcorrect + wrong_number + value !== self.defaulting_flag) ||
(!self.defaulting_behavior_on && rowcorrect + wrong_number + value === self.defaulting_flag)
)
return (rowcorrect + value && rowcorrect + value !== self.defaulting_flag ?
rowcorrect + value :
(row’answer’ + value && row’answer’ + value !== self.defaulting_flag ?
row’answer’ + value :
row’question’ + value
)
);
else
return ”;

},
get_possible_answers : function(row, is_correct)
var possible_answers = [];
var right_or_wrong = (is_correct ? ‘right’ : ‘wrong’);
if (rowright_or_wrong)
possible_answers.push(self.make_possible_answer(row, ”, is_correct));

for (var i = 0; i < 10; i++ )
if (rowright_or_wrong + i)
possible_answers.push(self.make_possible_answer(row, i, is_correct));

}
return possible_answers;
},
make_possible_answer: function(row, row_number, is_correct)
var right_or_wrong = (is_correct ? ‘right’ : ‘wrong’);
var answer =
answer: rowright_or_wrong + row_number,
correct: is_correct
;
for (var i = 0; i < self.possible_display_elements.length; i++ )
var display_element = self.possible_display_elementsi.name;
answerdisplay_element = self.pull_answer_value_from_spreadsheet(
row, display_element, row_number, is_correct
);

return answer;
},
make_quiz_data_from_spreadsheet_data: function(tabletop)
var i, j, sheetName, data;
var quiz = [];

// Find a sheet that _isn’t_ named “Results”.
for (sheetName in tabletop)
if (tabletop.hasOwnProperty(sheetName) && sheetName !== ‘Results’)
break;

}

data = tabletopsheetName.elements;

for (i = 0; i < data.length; i++)
var row = datai;
var possible_wrong_answers = self.get_possible_answers(row, false);
var possible_right_answers = self.get_possible_answers(row, true);

var right_answer_placement = [];
for (j = 0; j < possible_right_answers.length; j++)
right_answer_placement.push(
Math.round(Math.random() * possible_wrong_answers.length)
);

// IMPORTANT TO SORT THIS. rather than check if a value is in, we only check the first
right_answer_placement.sort();

var possible_answers= [];
var right_answers_placed = 0;
for (j = 0; j <= possible_wrong_answers.length; j++)
while (j === right_answer_placementright_answers_placed)
//push right answer
possible_answers.push(possible_right_answersright_answers_placed);
right_answers_placed++;

if (j === possible_wrong_answers.length)
continue;

possible_answers.push(possible_wrong_answersj);
}

var question =
question :
,
possible_answers : possible_answers,
rowNumber : row.rowNumber – 1
};
for (j = 0; j < self.possible_display_elements.length; j++)
var display_value = self.possible_display_elementsj.name;
question.questiondisplay_value = row’question’ + display_value;

quiz.push(question);
}
return quiz;
},
make_results_data_from_spreadsheet_data: function(tabletop, quiz_data)
var ret = make_default_how_you_did_htmls(quiz_data.length);

var data = tabletop’Results’ ? tabletop’Results’.elements : [];
for (var i = 0; i < data.length; i++)
var index = datai.numberofrightanswers;
if (index) index = parseInt(index, 10);
if (!isNaN(index))
if (!retindex)
console.log(“Invalid number of correct answers: ” + index);
else
retindex = datai.html;

}
}

return ret;
},
append_question : function(question_index)
var question_data = self.quiz_dataquestion_index;
var question_container = $(‘<li class=”question_container row-fluid question_’ +
question_index +
‘”>’
);
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 < self.possible_display_elements.length; i++)
question_container.append(
self.possible_display_elementsi.create_element(row.question)
);

return question_container;
},
build_possible_answer_elements_from_row : function(question, question_index)
var answers_container = $(”);

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 < question.possible_answers.length; i++)
var answer_data = question.possible_answersi;
var possible_answer = $(” +
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 < image_elements.length; i++)
if (!answer_data[image_elementsi]) continue;
this.answer_images[answer_data[image_elementsi]] = true;
}
self.possible_display_elementsi.name;
},
add_display_in_correct_place: function(container, place_in_display_elements, slide)
for ( var i = place_in_display_elements; 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 < self.possible_display_elements.length; i++)
var display_value = self.possible_display_elementsi.name;
if ( answerdisplay_value !== displayed_slidedisplay_value )
if ( !answerdisplay_value )
self.possible_display_elementsi.finder(slide).remove();
else if ( !displayed_slidedisplay_value )
self.add_display_in_correct_place(slide, i, answer);
else
self.possible_display_elementsi.finder(slide).replaceWith(
self.possible_display_elementsi.create_element( answer )
);

}
}
},

create_cover : function()
cover = $(‘#’ + self.container);
container_elem = $(”);
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 < self.quiz_data.length; i++)
if (typeof(answer_trackingi) === ‘undefined’)
unfinished = true;

if (user_answersi)
right_answers++;

}
var html;
if (unfinished && typeof(this.not_finished_html) !== ‘undefined’)
html = this.not_finished_html;
else
html = this.results_dataright_answers;

how_you_did_element.html(html);
}
};
return quiz.init(quiz_data, results_data, options);
};

$.fn.quiz = function(quiz_data, results_data, options)
if (!options) options = results_data; results_data = null;
if (!options) options = ; }
options.container = this.attr(‘id’);
this.quiz = $.quiz(quiz_data, results_data, options);
return this;
};
})(jQuery);

var quiz = jQuery(‘#quiz_container’).quiz(‘0ArjPQkXVuVJudDVzRnpXTVRzelRGVTVfMnV0ZDltU2c’);

Original post: 

Who Said It: Donald Sterling or Donald Trump?

Posted in Anchor, FF, GE, LAI, LG, ONA, PUR, Radius, Sterling, Uncategorized, Venta, Vintage | Tagged , , , , , , , , | Comments Off on Who Said It: Donald Sterling or Donald Trump?

QUIZ: Match the Political Scandal to the Apology

Mother Jones

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd”>

(function($)

$.quiz = function(quiz_data, options)
var container_elem;
var self;
var answer_tracking = [];
var correct_answers_element;

var quiz =
defaulting_behavior_on : true,
defaulting_flag : ‘!default’,
container : ‘quiz_container’,
possible_display_elements :

name : ‘backgroundimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slide) return ”;
return jQuery(”
);
}
},

name : ‘topimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(

);
}
},

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 jQuery(”
+ slidethis.name + ”
);
}
},

name : ‘title’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(‘


+ slidethis.name + ”
);
}
},

name : ‘middleimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(

);
}
},

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 jQuery(”
+ slidethis.name + ”
);
}
},

name : ‘subhed’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(”
+ slidethis.name
+ ”
);
}
},

name : ‘text’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(”
+ slidethis.name
+ ”
);
}
},

name : ‘bottomimage’,
finder: function(container)
return container.find(‘.’ + this.name);
,
create_element : function(slide)
if (!slidethis.name) return ”;
return jQuery(”
);
}
},

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 jQuery(”
+ slidethis.name + ”
);
}
},
],

init : function(quiz_data, options)

self = this;
if (options)
for ( var option in options )
selfoption = optionsoption;

}

if (typeof(quiz_data) === ‘string’)
//is a google spreadsheet
self.make_quiz_from_google_spreadsheet(quiz_data);
return self;

self.calculate_aspectratios(quiz_data);

self.quiz_data = quiz_data;

self.create_cover();

for ( var i = 0; i < self.quiz_data.length; i++ )
self.append_question(i);

self.append_how_you_did_section();

return self;
},
append_how_you_did_section: function()
correct_answers_element = jQuery(‘0’);
var how_you_did_element = jQuery(”);
how_you_did_element.append(jQuery(‘You got ‘));
how_you_did_element.append(correct_answers_element);
how_you_did_element.append(jQuery(‘ correct answers out of ‘ + self.quiz_data.length + ‘ questions’));
cover.append(how_you_did_element);
,

make_quiz_from_google_spreadsheet: function(spreadsheet_id)
Tabletop.init(
key: spreadsheet_id,
proxy : ‘https://s3.amazonaws.com/mj-tabletop-proxy’,
callback: function(data)
var quiz_data = self.make_quiz_data_from_spreadsheet_data(data);
self.init(quiz_data, options);
,
simpleSheet: true
});
},
calculate_aspectratios: function(data)
for (var i = 0; i < data.length; i++)
var row = datai;
for (var k = 0; k < row.possible_answers.length; k++)
var answer = row.possible_answersk;
self.find_aspectratio_for_each_type_of_video_embed(answer);

self.find_aspectratio_for_each_type_of_video_embed(row.question);
}
},

find_aspectratio_for_each_type_of_video_embed : function(slide)
for (var i = 0; i < self.possible_display_elements.length; i++ )
var display = self.possible_display_elementsi;
if ( display.needs_aspect_ratio && slidedisplay.name )
slidedisplay.name + ‘aspectratio’
= self.find_aspectratio(slidedisplay.name);

}
},
find_aspectratio: function(videoembed)
var height = videoembed.match(/height=”d+”/);
if (!height ;
height = parseInt(height0.replace(/height=”/, ”).replace(/”/, ”));

var width = videoembed.match(/width=”d+”/);
if (!width || !width0)
console.log(‘Your video embed code needs a width.’);
return ”;
;
width = parseInt(width0.replace(/width=”/, ”).replace(/”/, ”));

return (height / width)*100;
},
pull_answer_value_from_spreadsheet : function(row, value, wrong_number, correct)
var correct = correct ? ‘right’ : ‘wrong’;
if (rowcorrect + wrong_number + value && rowcorrect + wrong_number + value !== self.defaulting_flag)
return (rowcorrect + wrong_number + value);

if ( (self.defaulting_behavior_on && rowcorrect + wrong_number + value !== self.defaulting_flag)
|| (!self.defaulting_behavior_on && rowcorrect + wrong_number + value === self.defaulting_flag)
)
return (rowcorrect + value && rowcorrect + value !== self.defaulting_flag
? rowcorrect + value
: (row’answer’ + value && row’answer’ + value !== self.defaulting_flag
? row’answer’ + value
: row’question’ + value
)
);
else
return ”;

},
get_possible_answers : function(row, is_correct)
var possible_answers = [];
var right_or_wrong = (is_correct ? ‘right’ : ‘wrong’);
if (rowright_or_wrong)
possible_answers.push(self.make_possible_answer(row, ”, is_correct));

for (var i = 0; i < 10; i++ )
if (rowright_or_wrong + i)
possible_answers.push(self.make_possible_answer(row, i, is_correct));

}
return possible_answers;
},
make_possible_answer: function(row, row_number, is_correct)
var right_or_wrong = (is_correct ? ‘right’ : ‘wrong’);
var answer =
answer: rowright_or_wrong + row_number,
correct: is_correct
;
for (var i = 0; i < self.possible_display_elements.length; i++ )
var display_element = self.possible_display_elementsi.name;
answerdisplay_element = self.pull_answer_value_from_spreadsheet(
row, display_element, row_number, is_correct
)

return answer;
},
make_quiz_data_from_spreadsheet_data: function(data)
var quiz = [];
for (var i = 0; i < data.length; i++)
var row = datai;
var possible_wrong_answers = self.get_possible_answers(row, false);
var possible_right_answers = self.get_possible_answers(row, true);

var right_answer_placement = [];
for (var j = 0; j < possible_right_answers.length; j++)
right_answer_placement.push(
Math.round(Math.random() * possible_wrong_answers.length)
);

// IMPORTANT TO SORT THIS. rather than check if a value is in, we only check the first
right_answer_placement.sort();

var possible_answers= [];
var right_answers_placed = 0;
for (var j = 0; j <= possible_wrong_answers.length; j++)
while (j === right_answer_placementright_answers_placed)
//push right answer
possible_answers.push(possible_right_answersright_answers_placed);
right_answers_placed++;

if (j === possible_wrong_answers.length)
continue;

possible_answers.push(possible_wrong_answersj);
}

var question =
question :
,
possible_answers : possible_answers,
rowNumber : row.rowNumber – 1
};
for (var j = 0; j < self.possible_display_elements.length; j++)
var display_value = self.possible_display_elementsj.name;
question.questiondisplay_value = row’question’ + display_value;

quiz.push(question);
}
return quiz;
},
append_question : function(question_index)
var question_data = self.quiz_dataquestion_index
var question_container = jQuery(‘<li class=”question_container row-fluid question_’
+ question_index
+ ‘”>’
);
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 = jQuery(”);
for (var i = 0; i < self.possible_display_elements.length; i++)
question_container.append(
self.possible_display_elementsi.create_element(row.question)
);

return question_container;
},
build_possible_answer_elements_from_row : function(question, question_index)
var answers_container = jQuery(”);
for (var i = 0; i < question.possible_answers.length; i++)
var answer_data = question.possible_answersi;
var possible_answer = jQuery(”
+ answer_data.answer
+ ”);
(function(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
if ( typeof(answer_trackingquestion_index) === ‘undefined’ )
answer_trackingquestion_index = was_correct;
self.update_correct_answers_element();
cover.find(‘.question_’ + question_index).addClass(
‘first_guess_’
+ ( was_correct
? ‘right’
: ‘wrong’
)
);

//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;
});
})(question_index, i, possible_answer);
answers_container.append(possible_answer);
}
return answers_container;
},
add_display_in_correct_place: function(container, place_in_display_elements, slide)
for ( var i = place_in_display_elements; 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 < self.possible_display_elements.length; i++)
var display_value = self.possible_display_elementsi.name;
if ( answerdisplay_value != displayed_slidedisplay_value )
if ( !answerdisplay_value )
self.possible_display_elementsi.finder(slide).remove();
else if ( !displayed_slidedisplay_value )
self.add_display_in_correct_place(slide, i, answer);
else
self.possible_display_elementsi.finder(slide).before(
self.possible_display_elementsi.create_element( answer )
).remove();

}
}
},

create_cover : function()
cover = $(‘#’ + self.container);
container_elem = jQuery(”);
cover.append(container_elem);
container_elem.addClass(‘quiz_container’);
container_elem.css(‘padding’, ‘0px’);
,
update_correct_answers_element: function()
var right_answers = 0;
for (var i = 0; i < self.quiz_data.length; i++)
if (answer_trackingi)
right_answers++;

}
correct_answers_element.text(right_answers);
}
};
return quiz.init(quiz_data, options);
};

$.fn.quiz = function(quiz_data, options)
options = options ;
options.container = this.attr(‘id’);
this.quiz = $.quiz(quiz_data, options);
return this;
};
}(jQuery));

On Wednesday, at the end of a day dominated by reports that his aides had gleefully shut down a bridge as payback to a political rival, New Jersey Gov. Chris Christie took a moment to apologize. Sort of. “What I’ve seen today for the first time is unacceptable,” Christie said in a statement. “I am outraged and deeply saddened to learn that not only was I misled by a member of my staff, but this completely inappropriate and unsanctioned conduct was made without my knowledge.” The political apology (or non-apology, as the case may be), is an art form. But as with other art forms, its intricacies are often lost on the general public.

Below are excerpts from some of the more infamous apologies made by American politicians and Rob Ford. Can you match the apology to the offender?

var quiz = jQuery(‘#quiz_container’).quiz(‘0AuHOPshyxQGGdG9DVDBwdERFLVVNYVpGX1RzQVNCWkE’); //your published spreadsheet key or URL goes here

This article is from:  

QUIZ: Match the Political Scandal to the Apology

Posted in FF, GE, LG, ONA, Uncategorized, Venta | Tagged , , , , , , , , , , | Comments Off on QUIZ: Match the Political Scandal to the Apology