I'm really interested in the 'quiz trend'. I remember being 12 and taking a number of quizes that would purportedly tell me "Which character from your favourite TV show are you?" or "What percent elf are you?" or "What were you in your past life?". Buzzfeed is now king of the quizzes. You can find out basically anything about yourself in the buzzfeed quiz section.
Sidenote: I read a theory somewhere that this obsession with quizzes is to do with population growth. Ie. Back when you were the only baker in the village you knew who you were and how you were different to everyone else. Now you have to differ yourself from the rest of the planet by placing yourself into the middle of a venn-diagram that you make smaller and smaller through quizzes.
So - I thought the TaxPayers' Alliance could really benefit from one of these. Because everyone likes personality quizzes. So here it is!
This was a lot of fun to puzzle through! It took me a couple of days to write the content, figure out the personalities and what 'IT waste' should have in its wallet. Then I added the images and css because that's the fun part.
That was the fairly straightforward part. The rest is guessable but it took me a while to puzzle-through. I tried a few different solutions before deciding to use an array. If you pick the answer that corresponds to Personality 1 that will increment array value 1. At the end of the questions the position of the highest value in the array is returned and matched to a Personality Index.
So at the end of the questions you may have returned: 3 'Personality 1' answers; 2 'Personality 2' answers; 1 'Personality 3' answers.
In that case the array will be [3,2,1] and the index number returned will be 0. This is then re-matched to 'Personality 1' and that will be your result.
Pretty simple. But what about when the array is [2,2,2]?
I looked at how Buzzfeed did their quizzes and realised that when there was a clash Buzzfeed was just choosing the one at the end of the array whereas I wanted the choice to be randomised between the clashes.
After much experimenting the way I solved this is rather long-winded.
Another function then searches the array again for that value. The index number of that value is then pushed to a new array. If the new array only has 1 value in it then that 1 value is used as ther personality. If not then a random value is then selected from the new array!
Sidenote: I read a theory somewhere that this obsession with quizzes is to do with population growth. Ie. Back when you were the only baker in the village you knew who you were and how you were different to everyone else. Now you have to differ yourself from the rest of the planet by placing yourself into the middle of a venn-diagram that you make smaller and smaller through quizzes.
![]() |
| Sidenote 2: I'm Saturn. |
So - I thought the TaxPayers' Alliance could really benefit from one of these. Because everyone likes personality quizzes. So here it is!
This was a lot of fun to puzzle through! It took me a couple of days to write the content, figure out the personalities and what 'IT waste' should have in its wallet. Then I added the images and css because that's the fun part.
// Onclick disable future clicks and increment variables
$('input').click(function() {
if ($(this).parents('label').siblings('label').hasClass('finished')) {
} else {
$(this).parents('label').siblings('label').addClass('finished').css({'opacity':'0.6', 'cursor':'default'});
if ($(this).hasClass('alpha')) {
answersArray[0]++;
} else if ($(this).hasClass('bravo')) {
answersArray[1]++;
} else if ($(this).hasClass('charlie')) {
answersArray[2]++;
} else if ($(this).hasClass('delta')) {
answersArray[3]++;
} else if ($(this).hasClass('echo')) {
answersArray[4]++;
} else if ($(this).hasClass('foxtrot')) {
answersArray[5]++;
};
total ++;
};
That was the fairly straightforward part. The rest is guessable but it took me a while to puzzle-through. I tried a few different solutions before deciding to use an array. If you pick the answer that corresponds to Personality 1 that will increment array value 1. At the end of the questions the position of the highest value in the array is returned and matched to a Personality Index.
So at the end of the questions you may have returned: 3 'Personality 1' answers; 2 'Personality 2' answers; 1 'Personality 3' answers.
In that case the array will be [3,2,1] and the index number returned will be 0. This is then re-matched to 'Personality 1' and that will be your result.
Pretty simple. But what about when the array is [2,2,2]?
I looked at how Buzzfeed did their quizzes and realised that when there was a clash Buzzfeed was just choosing the one at the end of the array whereas I wanted the choice to be randomised between the clashes.
After much experimenting the way I solved this is rather long-winded.
//Figure out personality index
var finalResult = function() {
//Give the position of the number in the array that has the greatest value
var finalAnswer = answersArray.indexOf(Math.max.apply(Math,answersArray));
var finalAnswerValue = answersArray[finalAnswer];
var compareArray = [];
//Push the index of items in answersArray that == the maximum points number
for (var i = 0; i < answersArray.length; i++) {
if (finalAnswerValue == answersArray[i]) {
compareArray.push(i);
}
}
// If there is nothing in the compare array go with the original answer if not select a random value from the compareArray
if (compareArray.length === 0) {
personalityIndex = finalAnswer;
} else {
personalityIndex = compareArray[Math.floor(Math.random() * compareArray.length)];
}
};
After searching for the highest number in the array and pushing that to a variable.Another function then searches the array again for that value. The index number of that value is then pushed to a new array. If the new array only has 1 value in it then that 1 value is used as ther personality. If not then a random value is then selected from the new array!
